MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / generate_image

Function generate_image

test_conformance/profiling/copy.cpp:86–95  ·  view source on GitHub ↗

----- helper functions

Source from the content-addressed store, hash-verified

84
85//----- helper functions
86static cl_uchar *generate_image( int n, MTdata d )
87{
88 cl_uchar *ptr = (cl_uchar *)malloc( n );
89 int i;
90
91 for( i = 0; i < n; i++ )
92 ptr[i] = (cl_uchar)genrand_int32(d);
93
94 return ptr;
95}
96
97
98static int copy_size( cl_device_id device, cl_context context, cl_command_queue queue, int num_elements, MTdata d )

Callers 2

copy_image_sizeFunction · 0.85
REGISTER_TESTFunction · 0.85

Calls 1

genrand_int32Function · 0.85

Tested by

no test coverage detected