/external/OpenCL-CTS/test_conformance/extensions/cl_khr_dx9_media_sharing/ |
D | utils.h | 110 void YUVGenerateNV12(std::vector<cl_uchar> &yuv, unsigned int width, 111 unsigned int height, cl_uchar valueMin, cl_uchar valueMax, 113 void YUVGenerateYV12(std::vector<cl_uchar> &yuv, unsigned int width, 114 unsigned int height, cl_uchar valueMin, cl_uchar valueMax, 116 bool YUVGenerate(TSurfaceFormat surfaceFormat, std::vector<cl_uchar> &yuv, 117 unsigned int width, unsigned int height, cl_uchar valueMin, 118 cl_uchar valueMax, double valueAdd = 0.0); 120 const std::vector<cl_uchar> &yuv, unsigned int width, 123 const std::vector<cl_uchar> &yuv, unsigned int width, 127 const std::vector<cl_uchar> &yuv, unsigned int width, [all …]
|
D | utils.cpp | 101 void YUVGenerateNV12(std::vector<cl_uchar> &yuv, unsigned int width, in YUVGenerateNV12() 102 unsigned int height, cl_uchar valueMin, cl_uchar valueMax, in YUVGenerateNV12() 123 yuv.at(offset + j) = static_cast<cl_uchar>( in YUVGenerateNV12() 139 yuv.at(offset + j * 2) = static_cast<cl_uchar>( in YUVGenerateNV12() 141 yuv.at(offset + j * 2 + 1) = static_cast<cl_uchar>( in YUVGenerateNV12() 147 void YUVGenerateYV12(std::vector<cl_uchar> &yuv, unsigned int width, in YUVGenerateYV12() 148 unsigned int height, cl_uchar valueMin, cl_uchar valueMax, in YUVGenerateYV12() 171 yuv.at(plane0Offset + j) = static_cast<cl_uchar>( in YUVGenerateYV12() 185 yuv.at(plane1Offset + j) = static_cast<cl_uchar>( in YUVGenerateYV12() 199 yuv.at(plane2Offset + j) = static_cast<cl_uchar>( in YUVGenerateYV12() [all …]
|
D | test_functions_api.cpp | 26 const cl_uchar MAX_VALUE = 255 / 2; in api_functions() 38 std::vector<std::vector<cl_uchar>> bufferRef1(FRAME_NUM); in api_functions() 39 std::vector<std::vector<cl_uchar>> bufferRef2(FRAME_NUM); in api_functions() 40 std::vector<std::vector<cl_uchar>> bufferRef3(FRAME_NUM); in api_functions() 42 cl_uchar step = MAX_VALUE / FRAME_NUM; in api_functions() 46 static_cast<cl_uchar>(step * i), in api_functions() 47 static_cast<cl_uchar>(step * (i + 1))) in api_functions() 49 static_cast<cl_uchar>(step * i), in api_functions() 50 static_cast<cl_uchar>(step * (i + 1)), 0.2) in api_functions() 52 static_cast<cl_uchar>(step * i), in api_functions() [all …]
|
D | test_other_data_types.cpp | 564 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 573 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 609 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 651 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 661 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 671 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 681 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 747 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 756 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() 765 if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10, in test_other_data_types() [all …]
|
/external/OpenCL-CTS/test_conformance/profiling/ |
D | execute_multipass.cpp | 48 static cl_uchar *createImage( int elements, MTdata d ) in createImage() 51 cl_uchar *ptr = (cl_uchar *)malloc( elements * sizeof( cl_uchar ) ); in createImage() 56 ptr[i] = (cl_uchar)genrand_int32(d); in createImage() 64 static int verifyImages( cl_uchar *ptr0, cl_uchar *ptr1, cl_uchar tolerance, int xsize, int ysize, … in verifyImages() 67 cl_uchar *p0 = ptr0; in verifyImages() 68 cl_uchar *p1 = ptr1; in verifyImages() 74 if( (cl_uchar)abs( (int)( *p0++ - *p1++ ) ) > tolerance ){ in verifyImages() 90 int w, int h, int d, int nChannels, cl_uchar *inptr, cl_uchar *outptr ) in run_kernel() 269 cl_uchar *inptr; in execute_multipass() 270 cl_uchar *outptr; in execute_multipass() [all …]
|
D | writeImage.cpp | 324 static cl_uchar *generateImage( int n, MTdata d ) in generateImage() 326 cl_uchar *ptr = (cl_uchar *)malloc( n * sizeof( cl_uchar ) ); in generateImage() 330 ptr[i] = (cl_uchar)genrand_int32(d); in generateImage() 352 static int verifyImage( cl_uchar *image, cl_uchar *outptr, int w, int h ) in verifyImage() 388 static double *prepareReference( cl_uchar *inptr, int w, int h) in prepareReference() 421 size_t channel_nbytes = sizeof( cl_uchar ); in write_image() 601 refptr = prepareReference( (cl_uchar *)inptr, w, h ); in write_image() 611 err = verifyImage( (cl_uchar *)inptr, (cl_uchar *)dst, w, h ); in write_image()
|
D | readImage.cpp | 79 static cl_uchar *generateImage( int n, MTdata d ) in generateImage() 81 cl_uchar *ptr = (cl_uchar *)malloc( n * sizeof( cl_uchar ) ); in generateImage() 85 ptr[i] = (cl_uchar)genrand_int32( d ); in generateImage() 107 static int verifyImage( cl_uchar *image, cl_uchar *outptr, int w, int h ) in verifyImage() 138 size_t channel_nbytes = sizeof( cl_uchar ); in read_image() 318 err = verifyImage( (cl_uchar *)inptr, (cl_uchar *)dst, w, h ); in read_image()
|
/external/OpenCL-CTS/test_common/gl/ |
D | helpers.cpp | 114 cl_uchar *p = (cl_uchar *)buffer; in CreateGLTexture1DArray() 116 cl_uchar uc0 = p[i * 4 + 0]; in CreateGLTexture1DArray() 117 cl_uchar uc1 = p[i * 4 + 1]; in CreateGLTexture1DArray() 118 cl_uchar uc2 = p[i * 4 + 2]; in CreateGLTexture1DArray() 119 cl_uchar uc3 = p[i * 4 + 3]; in CreateGLTexture1DArray() 131 cl_uchar *p = (cl_uchar *)buffer; in CreateGLTexture1DArray() 134 cl_uchar uc0 = p[i * 4 + 0]; in CreateGLTexture1DArray() 135 cl_uchar uc1 = p[i * 4 + 1]; in CreateGLTexture1DArray() 136 cl_uchar uc2 = p[i * 4 + 2]; in CreateGLTexture1DArray() 137 cl_uchar uc3 = p[i * 4 + 3]; in CreateGLTexture1DArray() [all …]
|
/external/OpenCL-CTS/test_conformance/SVM/ |
D | test_pointer_passing.cpp | 53 …cl_uchar *pbuf_svm_alloc = (cl_uchar*) clSVMAlloc(context, CL_MEM_READ_WRITE, sizeof(cl_uchar)*buf… in test_svm_pointer_passing() 59 …clMemWrapper buf = clCreateBuffer(context, CL_MEM_USE_HOST_PTR, sizeof(cl_uchar)*bufSize, pbuf_svm… in test_svm_pointer_passing() 70 …cl_uchar* pbuf_map_buffer = (cl_uchar*) clEnqueueMapBuffer(cmdq, buf, CL_TRUE, CL_MAP_READ | CL_MA… in test_svm_pointer_passing() 74 pbuf_map_buffer[i]= (cl_uchar)i; in test_svm_pointer_passing() 84 cl_uchar* pChar = &pbuf_svm_alloc[i]; in test_svm_pointer_passing() 87 …error = clSetKernelArg(kernel_verify_char, 2, sizeof(cl_uchar), (void *) &i ); // pass the expect… in test_svm_pointer_passing()
|
D | test_enqueue_api.cpp | 33 void generate_data(std::vector<cl_uchar> &data, size_t size, MTdata seed) in generate_data() 45 data[i] = (cl_uchar)( randomData & 255 ); in generate_data() 90 sizeof(cl_uchar), in test_svm_enqueue_api() 140 std::vector<cl_uchar> fillData0(typeSizes[i]), fillData1(typeSizes[i]); in test_svm_enqueue_api() 144 std::vector<cl_uchar> srcHostData(data_size, 0); in test_svm_enqueue_api() 145 std::vector<cl_uchar> dstHostData(data_size, 0); in test_svm_enqueue_api() 149 cl_uchar *srcBuffer = (cl_uchar *)clSVMAlloc(context, CL_MEM_READ_WRITE, data_size, 0); in test_svm_enqueue_api() 150 cl_uchar *dstBuffer = (cl_uchar *)clSVMAlloc(context, CL_MEM_READ_WRITE, data_size, 0); in test_svm_enqueue_api() 164 cl_uchar * src_ptr; in test_svm_enqueue_api() 165 cl_uchar * dst_ptr; in test_svm_enqueue_api()
|
/external/OpenCL-CTS/test_conformance/spirv_new/ |
D | test_op_spec_constant.cpp | 124 TEST_SPEC_CONSTANT(uchar, cl_uchar, 19, 4) 139 cl_uchar value = (cl_uchar)7; 140 cl_uchar init_value = value; 141 cl_uchar final_value = value + 1; 142 return test_spec_constant<cl_uchar>(deviceID, context, queue, 151 cl_uchar value = (cl_uchar)7; 152 cl_uchar init_value = value; 153 cl_uchar final_value = value + 1; 154 return test_spec_constant<cl_uchar>(deviceID, context, queue,
|
/external/OpenCL-CTS/test_conformance/basic/ |
D | test_progvar.cpp | 150 std::string as_string(const cl_uchar* value_ptr) const { in as_string() 192 void init( cl_uchar* buf, cl_uchar val) const { in init() 204 void init_elem( cl_uchar* buf, cl_uchar val ) const { in init_elem() 220 if ( l_host_is_big_endian ) *(buf + elem_size-1) = (cl_uchar)val; in init_elem() 221 else *buf = (cl_uchar)val; in init_elem() 330 static void l_set_randomly( cl_uchar* buf, size_t buf_size, RandomSeed& rand_state ); 331 static int l_compare( const cl_uchar* expected, const cl_uchar* received, unsigned num_values, cons… 332 static int l_copy( cl_uchar* dest, unsigned dest_idx, const cl_uchar* src, unsigned src_idx, const … 644 static void l_set_randomly( cl_uchar* buf, size_t buf_size, RandomSeed& rand_state ) in l_set_randomly() 660 static int l_compare( const char* test_name, const cl_uchar* expected, const cl_uchar* received, si… in l_compare() [all …]
|
D | test_image_r8.cpp | 76 cl_uchar *input_ptr, *output_ptr; in test_image_r8() 102 output_ptr = (cl_uchar*)malloc(sizeof(cl_uchar) * img_width * img_height); in test_image_r8() 113 sizeof(cl_uchar) * img_width * img_height, NULL, NULL); in test_image_r8() 158 …err = clEnqueueReadBuffer( queue, streams[1], CL_TRUE, 0, sizeof(cl_uchar)*img_width*img_height, (… in test_image_r8()
|
D | test_imagearraycopy3d.cpp | 28 cl_uchar *imgptr, *bufptr; in test_imagearraycopy3d_single_format() 48 buffer_size = sizeof(cl_uchar) * elem_size * img_width * img_height * img_depth; in test_imagearraycopy3d_single_format() 54 imgptr = (cl_uchar*)malloc(buffer_size); in test_imagearraycopy3d_single_format() 56 imgptr[i] = (cl_uchar)genrand_int32(d); in test_imagearraycopy3d_single_format() 67 bufptr = (cl_uchar*)malloc(buffer_size); in test_imagearraycopy3d_single_format()
|
D | test_arrayimagecopy.cpp | 28 cl_uchar *bufptr, *imgptr; in test_arrayimagecopy_single_format() 48 buffer_size = sizeof(cl_uchar) * elem_size * img_width * img_height; in test_arrayimagecopy_single_format() 54 bufptr = (cl_uchar*)malloc(buffer_size); in test_arrayimagecopy_single_format() 56 bufptr[i] = (cl_uchar)genrand_int32(d); in test_arrayimagecopy_single_format() 67 imgptr = (cl_uchar*)malloc(buffer_size); in test_arrayimagecopy_single_format()
|
D | test_imagearraycopy.cpp | 28 cl_uchar *imgptr, *bufptr; in test_imagearraycopy_single_format() 48 buffer_size = sizeof(cl_uchar) * elem_size * img_width * img_height; in test_imagearraycopy_single_format() 54 imgptr = (cl_uchar*)malloc(buffer_size); in test_imagearraycopy_single_format() 56 imgptr[i] = (cl_uchar)genrand_int32(d); in test_imagearraycopy_single_format() 67 bufptr = (cl_uchar*)malloc(buffer_size); in test_imagearraycopy_single_format()
|
D | test_arrayimagecopy3d.cpp | 28 cl_uchar *bufptr, *imgptr; in test_arrayimagecopy3d_single_format() 49 buffer_size = sizeof(cl_uchar) * elem_size * img_width * img_height * img_depth; in test_arrayimagecopy3d_single_format() 55 bufptr = (cl_uchar*)malloc(buffer_size); in test_arrayimagecopy3d_single_format() 57 bufptr[i] = (cl_uchar)genrand_int32(d); in test_arrayimagecopy3d_single_format() 68 imgptr = (cl_uchar*)malloc(buffer_size); in test_arrayimagecopy3d_single_format()
|
/external/OpenCL-CTS/test_conformance/integer_ops/ |
D | test_integers.cpp | 170 ((cl_uchar*)&expected)[0], in test_single_param_integer_kernel() 171 *( (cl_uchar *)p ), in test_single_param_integer_kernel() 172 *( (cl_uchar *)in ), in test_single_param_integer_kernel() 173 *( (cl_uchar *)in2 ) ); in test_single_param_integer_kernel() 177 ((cl_uchar*)&expected)[0], in test_single_param_integer_kernel() 178 *( (cl_uchar *)p ), in test_single_param_integer_kernel() 179 *( (cl_uchar *)in ) ); in test_single_param_integer_kernel() 265 testValue = *( (cl_uchar *)source ); in verify_integer_clz() 266 typeBits = 8 * sizeof( cl_uchar ); in verify_integer_clz() 312 *( (cl_uchar *)destination ) = count; in verify_integer_clz() [all …]
|
D | test_absdiff.cpp | 29 const cl_uchar *outptr = (const cl_uchar *)r; in verify_absdiff_char() 33 cl_uchar r = inA[i] - inB[i]; in verify_absdiff_char() 44 const cl_uchar *inA = (const cl_uchar *)p; in verify_absdiff_uchar() 45 const cl_uchar *inB = (const cl_uchar *)q; in verify_absdiff_uchar() 46 const cl_uchar *outptr = (const cl_uchar *)r; in verify_absdiff_uchar() 50 cl_uchar r = inA[i] - inB[i]; in verify_absdiff_uchar()
|
D | test_abs.cpp | 30 const cl_uchar *outptr = (const cl_uchar*) q; in verify_abs_char() 34 cl_uchar r = inA[i]; in verify_abs_char() 96 const cl_uchar *inA = (const cl_uchar*) p; in verify_abs_uchar() 97 const cl_uchar *outptr = (const cl_uchar*) q; in verify_abs_uchar() 101 cl_uchar r = inA[i]; in verify_abs_uchar()
|
/external/OpenCL-CTS/test_conformance/conversions/ |
D | basic_test_conversions.cpp | 67 sizeof( cl_uchar ), sizeof( cl_char ), 606 static void uchar2char( void *out, void *in){ ((char*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2char() 607 static void uchar2ushort( void *out, void *in){ ((cl_ushort*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2ushort() 608 static void uchar2short( void *out, void *in){ ((short*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2short() 609 static void uchar2uint( void *out, void *in){ ((cl_uint*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2uint() 610 static void uchar2int( void *out, void *in){ ((int*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2int() 613 cl_uchar l = ((cl_uchar*) in)[0]; in uchar2float() 618 cl_uchar l = ((cl_uchar*) in)[0]; in uchar2double() 621 static void uchar2ulong( void *out, void *in){ ((cl_ulong*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2ulong() 622 static void uchar2long( void *out, void *in){ ((cl_long*) out)[0] = ((cl_uchar*) in)[0]; } in uchar2long() [all …]
|
/external/OpenCL-CTS/test_conformance/spir/ |
D | typeinfo.h | 188 … false, 0, 1, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 189 … true, 0, 16, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 190 … false, 0, 16, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 191 … true, 0, 16, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 192 … false, 0, 2, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 193 … true, 0, 2, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 194 … false, 0, 3, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 195 … true, 0, 3, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 196 … false, 0, 4, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) 197 … true, 0, 4, 0x0, 0xff, KernelArgGeneratorT<cl_uchar>) [all …]
|
/external/OpenCL-CTS/test_conformance/select/ |
D | util_select.cpp | 35 sizeof(cl_uchar), sizeof(cl_char), 72 cl_uchar *d, *x, *y; in refselect_1u8() 74 d = (cl_uchar*) dest; in refselect_1u8() 75 x = (cl_uchar*) src1; in refselect_1u8() 76 y = (cl_uchar*) src2; in refselect_1u8() 156 cl_uchar *m; in refselect_1i8u() 160 m = (cl_uchar*) cmp; in refselect_1i8u() 167 cl_uchar *d, *x, *y, *m; in refselect_1u8u() 168 d = (cl_uchar*) dest; in refselect_1u8u() 169 x = (cl_uchar*) src1; in refselect_1u8u() [all …]
|
/external/OpenCL-CTS/test_common/gles/ |
D | helpers.cpp | 159 cl_uchar *p = (cl_uchar *)buffer; in CreateGLTexture2D() 162 cl_uchar uc0 = p[i * 4 + 0]; in CreateGLTexture2D() 163 cl_uchar uc1 = p[i * 4 + 1]; in CreateGLTexture2D() 164 cl_uchar uc2 = p[i * 4 + 2]; in CreateGLTexture2D() 165 cl_uchar uc3 = p[i * 4 + 3]; in CreateGLTexture2D() 247 cl_uchar *p = (cl_uchar *)buffer; in CreateGLTexture3D() 250 cl_uchar uc0 = p[i * 4 + 0]; in CreateGLTexture3D() 251 cl_uchar uc1 = p[i * 4 + 1]; in CreateGLTexture3D() 252 cl_uchar uc2 = p[i * 4 + 2]; in CreateGLTexture3D() 253 cl_uchar uc3 = p[i * 4 + 3]; in CreateGLTexture3D() [all …]
|
/external/OpenCL-CTS/test_conformance/computeinfo/ |
D | device_uuid.cpp | 24 using uuid = std::array<cl_uchar, CL_UUID_SIZE_KHR>; 25 using luid = std::array<cl_uchar, CL_LUID_SIZE_KHR>; 29 for (const cl_uchar c : id) in log_info_uuid() 37 for (const cl_uchar c : id) in log_error_uuid()
|