mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Remove code under USE_LOCAL_THREADS (#850)
Code uses outdated API calls Fixes #715 Change-Id: I575c8ec4003fd30a3cec28ad114d5749f2e83d0f Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
This commit is contained in:
@@ -130,9 +130,6 @@ int read_image( cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
cl_event readEvent;
|
||||
cl_ulong queueStart, submitStart, readStart, readEnd;
|
||||
size_t threads[2];
|
||||
#ifdef USE_LOCAL_THREADS
|
||||
size_t localThreads[2];
|
||||
#endif
|
||||
int err;
|
||||
int w = 64, h = 64;
|
||||
cl_mem_flags flags;
|
||||
@@ -150,16 +147,6 @@ int read_image( cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
threads[0] = (size_t)w;
|
||||
threads[1] = (size_t)h;
|
||||
|
||||
#ifdef USE_LOCAL_THREADS
|
||||
err = clGetDeviceConfigInfo( id, CL_DEVICE_MAX_THREAD_GROUP_SIZE, localThreads, sizeof( unsigned int ), NULL );
|
||||
test_error( err, "Unable to get thread group max size" );
|
||||
localThreads[1] = localThreads[0];
|
||||
if( localThreads[0] > threads[0] )
|
||||
localThreads[0] = threads[0];
|
||||
if( localThreads[1] > threads[1] )
|
||||
localThreads[1] = threads[1];
|
||||
#endif
|
||||
|
||||
d = init_genrand( gRandomSeed );
|
||||
if( image_format_desc.image_channel_data_type == CL_SIGNED_INT8 )
|
||||
inptr = (void *)generateSignedImage( w * h * 4, d );
|
||||
@@ -231,11 +218,8 @@ int read_image( cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef USE_LOCAL_THREADS
|
||||
err = clEnqueueNDRangeKernel(queue, kernel[0], 2, NULL, threads, localThreads, 0, NULL, NULL );
|
||||
#else
|
||||
err = clEnqueueNDRangeKernel(queue, kernel[0], 2, NULL, threads, NULL, 0, NULL, NULL );
|
||||
#endif
|
||||
|
||||
if( err != CL_SUCCESS ){
|
||||
print_error( err, "clEnqueueNDRangeKernel failed" );
|
||||
clReleaseKernel( kernel[0] );
|
||||
|
||||
Reference in New Issue
Block a user