mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 22:19:02 +00:00
Remove unnecessary cl_mem_flags casts (#1018)
* api, atomics: remove unnecessary cl_mem_flags casts Instances in api, atomics, buffers and c11_atomics suites Contributes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * basic: remove unnecessary cl_mem_flags casts Contributes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * spir, thread_dimensions: remove unnecessary cl_mem_flags casts Instances in spir, thread_dimensions and workgroups tests Contributes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * profiling, relationals: remove unnecessary cl_mem_flags casts Includes relationals, profiling, muliple_device_context, integer_ops tests Contributes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * clcpp: remove unnecessary cl_mem_flags casts Contibutes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * events, geometrics: remove unnecessary cl_mem_flags casts Includes events, geometrics, gl and images tests Contributes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * commonfs, compiler: remove unnecessary cl_mem_flags casts Includes cast removal in commonfs, compiler and device_partition tests Fixes #759 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * Fix up formatting Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
This commit is contained in:
@@ -184,8 +184,9 @@ static int kernelFilter( cl_device_id device, cl_context context, cl_command_que
|
||||
threads[1] = h;
|
||||
|
||||
// allocate the input and output image memory objects
|
||||
memobjs[0] = create_image_2d( context, (cl_mem_flags)(CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR),
|
||||
&image_format_desc, w, h, 0, inptr, &err );
|
||||
memobjs[0] =
|
||||
create_image_2d(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
|
||||
&image_format_desc, w, h, 0, inptr, &err);
|
||||
if( memobjs[0] == (cl_mem)0 ){
|
||||
log_error( " unable to create 2D image using create_image_2d\n" );
|
||||
return -1;
|
||||
@@ -199,8 +200,9 @@ static int kernelFilter( cl_device_id device, cl_context context, cl_command_que
|
||||
}
|
||||
|
||||
// allocate an array memory object to load the filter weights
|
||||
memobjs[2] = clCreateBuffer( context, (cl_mem_flags)( CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR ),
|
||||
sizeof( cl_float ) * filter_w * filter_h, &filter_weights, &err );
|
||||
memobjs[2] = clCreateBuffer(
|
||||
context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
|
||||
sizeof(cl_float) * filter_w * filter_h, &filter_weights, &err);
|
||||
if( memobjs[2] == (cl_mem)0 ){
|
||||
log_error( " unable to create array using clCreateBuffer\n" );
|
||||
clReleaseMemObject( memobjs[1] );
|
||||
|
||||
Reference in New Issue
Block a user