Home
last modified time | relevance | path

Searched refs:cl_uchar (Results 1 – 25 of 87) sorted by relevance

1234

/external/OpenCL-CTS/test_conformance/extensions/cl_khr_dx9_media_sharing/
Dutils.h110 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 …]
Dutils.cpp101 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 …]
Dtest_functions_api.cpp26 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 …]
Dtest_other_data_types.cpp564 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/
Dexecute_multipass.cpp48 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 …]
DwriteImage.cpp324 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()
DreadImage.cpp79 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/
Dhelpers.cpp114 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/
Dtest_pointer_passing.cpp53cl_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()
70cl_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()
Dtest_enqueue_api.cpp33 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/
Dtest_op_spec_constant.cpp124 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/
Dtest_progvar.cpp150 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 …]
Dtest_image_r8.cpp76 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()
Dtest_imagearraycopy3d.cpp28 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()
Dtest_arrayimagecopy.cpp28 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()
Dtest_imagearraycopy.cpp28 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()
Dtest_arrayimagecopy3d.cpp28 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/
Dtest_integers.cpp170 ((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 …]
Dtest_absdiff.cpp29 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()
Dtest_abs.cpp30 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/
Dbasic_test_conversions.cpp67 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/
Dtypeinfo.h188 … 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/
Dutil_select.cpp35 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/
Dhelpers.cpp159 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/
Ddevice_uuid.cpp24 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()

1234