Passed on intel(CPU), beignet, CUDA Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu> --- tests/cl/program/execute/vstore_half-double.cl | 140 +++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 tests/cl/program/execute/vstore_half-double.cl
diff --git a/tests/cl/program/execute/vstore_half-double.cl b/tests/cl/program/execute/vstore_half-double.cl new file mode 100644 index 0000000..e3669a4 --- /dev/null +++ b/tests/cl/program/execute/vstore_half-double.cl @@ -0,0 +1,140 @@ +/*! +[config] +name: Vector store_half double2,3,4,8,16 +clc_version_min: 10 +require_device_extensions: cl_khr_fp64 + +dimensions: 1 +global_size: 1 0 0 + +[test] +name: scalar store_half double +kernel_name: vstore_half_test +arg_out: 0 buffer half[1] 34.0 +arg_in: 1 buffer double[1] 34.0 + +[test] +name: vector store_half double2 +kernel_name: vstore_half2_test +arg_out: 0 buffer half[2] 56.0 65.0 +arg_in: 1 buffer double[2] 56.0 65.0 + +[test] +name: vector store_half double2 with offset +kernel_name: vstore_half2_offset +arg_out: 0 buffer half[4] 0 0 56.0 65.0 +arg_in: 1 buffer double[2] 56.0 65.0 + +[test] +name: vector store_half double3 +kernel_name: vstore_half3_test +arg_out: 0 buffer half[3] 56.0 65.0 12.0 +arg_in: 1 buffer double[3] 56.0 65.0 12.0 + +[test] +name: vector store_half double3 with offset +kernel_name: vstore_half3_offset +arg_out: 0 buffer half[6] 0 0 0 56.0 65.0 12.0 +arg_in: 1 buffer double[3] 56.0 65.0 12.0 + +[test] +name: vector store_half double4 +kernel_name: vstore_half4_test +arg_out: 0 buffer half[4] 56.0 65.0 18.0 81.0 +arg_in: 1 buffer double[4] 56.0 65.0 18.0 81.0 + +[test] +name: vector store_half double4 with offset +kernel_name: vstore_half4_offset +arg_out: 0 buffer half[8] 0 0 0 0 56.0 65.0 18.0 81.0 +arg_in: 1 buffer double[4] 56.0 65.0 18.0 81.0 + +[test] +name: vector store_half double8 +kernel_name: vstore_half8_test +arg_out: 0 buffer half[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 +arg_in: 1 buffer double[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 + +[test] +name: vector store_half double8 with offset +kernel_name: vstore_half8_offset +arg_out: 0 buffer half[16] 0 0 0 0 0 0 0 0 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 +arg_in: 1 buffer double[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 + +[test] +name: vector store_half double16 +kernel_name: vstore_half16_test +arg_out: 0 buffer half[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0 +arg_in: 1 buffer double[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0 + +[test] +name: vector store_half double16 with offset +kernel_name: vstore_half16_offset +arg_out: 0 buffer half[32] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \ + 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0 +arg_in: 1 buffer double[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0 +!*/ + +#pragma OPENCL EXTENSION cl_khr_fp64 : enable + +kernel void vstore_half_test(global half* out, global double* in) { + double val = in[0]; + vstore_half(val, 0, out); +} + +kernel void vstore_half2_test(global half* out, global double* in) { + double2 val = {in[0], in[1]}; + vstore_half2(val, 0, out); +} + +kernel void vstore_half2_offset(global half* out, global double* in) { + double2 val = {in[0], in[1]}; + vstore_half2((double2)0, 0, out); + vstore_half2(val, 1, out); +} + +kernel void vstore_half3_test(global half* out, global double* in) { + double3 val = {in[0], in[1], in[2]}; + vstore_half3(val, 0, out); +} + +kernel void vstore_half3_offset(global half* out, global double* in) { + double3 val = {in[0], in[1], in[2]}; + vstore_half3((double3)0, 0, out); + vstore_half3(val, 1, out); +} + +kernel void vstore_half4_test(global half* out, global double* in) { + double4 val = {in[0], in[1], in[2], in[3]}; + vstore_half4(val, 0, out); +} + +kernel void vstore_half4_offset(global half* out, global double* in) { + double4 val = {in[0], in[1], in[2], in[3]}; + vstore_half4((double4)0, 0, out); + vstore_half4(val, 1, out); +} + +kernel void vstore_half8_test(global half* out, global double* in) { + double8 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]}; + vstore_half8(val, 0, out); +} + +kernel void vstore_half8_offset(global half* out, global double* in) { + double8 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]}; + vstore_half8((double8)0, 0, out); + vstore_half8(val, 1, out); +} + +kernel void vstore_half16_test(global half* out, global double* in) { + double16 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7], + in[8], in[9], in[10], in[11], in[12], in[13], in[14], in[15]}; + vstore_half16(val, 0, out); +} + +kernel void vstore_half16_offset(global half* out, global double* in) { + double16 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7], + in[8], in[9], in[10], in[11], in[12], in[13], in[14], in[15]}; + vstore_half16((double16)0, 0, out); + vstore_half16(val, 1, out); +} -- 2.7.4 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit