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:
ellnor01
2020-10-19 13:56:02 +01:00
committed by GitHub
parent 8ca1537157
commit a6809710ea
140 changed files with 1077 additions and 556 deletions

View File

@@ -1233,7 +1233,8 @@ int test_buffer_read_struct(cl_device_id deviceID, cl_context context, cl_comman
log_error( " unable to allocate %d bytes for output_ptr\n", (int)(objSize * num_elements) );
return -1;
}
buffers[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), objSize * num_elements, NULL , &err);
buffers[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
objSize * num_elements, NULL, &err);
if ( err != CL_SUCCESS ){
print_error( err, " clCreateBuffer failed\n" );
align_free( output_ptr );
@@ -1334,7 +1335,8 @@ static int testRandomReadSize( cl_device_id deviceID, cl_context context, cl_com
}
return -1;
}
buffers[i] = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE), ptrSizes[i] * num_elements, NULL, &err);
buffers[i] = clCreateBuffer(context, CL_MEM_READ_WRITE,
ptrSizes[i] * num_elements, NULL, &err);
if ( err != CL_SUCCESS ){
print_error(err, " clCreateBuffer failed\n" );
for ( j = 0; j < i; j++ ){