mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-20 14:39:01 +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:
@@ -133,7 +133,8 @@ int run_work_group_named_barrier_barrier_test(cl_device_id device, cl_context co
|
||||
std::vector<cl_uint> output = generate_output<cl_uint>(work_size[0], 9999);
|
||||
|
||||
// device output buffer
|
||||
buffers[0] = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * output.size(), NULL, &err);
|
||||
buffers[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_uint) * output.size(), NULL, &err);
|
||||
RETURN_ON_CL_ERROR(err, "clCreateBuffer")
|
||||
|
||||
// Execute test kernels
|
||||
|
||||
@@ -276,7 +276,9 @@ struct global_fence_named_barrier_test : public work_group_named_barrier_test_ba
|
||||
RETURN_ON_CL_ERROR(err, "clGetCommandQueueInfo")
|
||||
|
||||
// create temp buffer
|
||||
auto temp_buffer = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * work_size, NULL, &err);
|
||||
auto temp_buffer =
|
||||
clCreateBuffer(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_uint) * work_size, NULL, &err);
|
||||
RETURN_ON_CL_ERROR(err, "clCreateBuffer")
|
||||
|
||||
err = clSetKernelArg(kernel, 0, sizeof(output_buffer), &output_buffer);
|
||||
@@ -420,10 +422,9 @@ struct global_local_fence_named_barrier_test : public work_group_named_barrier_t
|
||||
RETURN_ON_CL_ERROR(err, "clGetCommandQueueInfo")
|
||||
|
||||
// create temp buffer
|
||||
auto temp_buffer = clCreateBuffer(
|
||||
context, (cl_mem_flags)(CL_MEM_READ_WRITE),
|
||||
sizeof(cl_uint) * work_size, NULL, &err
|
||||
);
|
||||
auto temp_buffer =
|
||||
clCreateBuffer(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_uint) * work_size, NULL, &err);
|
||||
RETURN_ON_CL_ERROR(err, "clCreateBuffer")
|
||||
|
||||
err = clSetKernelArg(kernel, 0, sizeof(output_buffer), &output_buffer);
|
||||
|
||||
@@ -270,7 +270,9 @@ struct spec_example_work_group_named_barrier_test : public work_group_named_barr
|
||||
RETURN_ON_CL_ERROR(err, "clGetCommandQueueInfo")
|
||||
|
||||
// create temp buffer
|
||||
auto temp_buffer = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * work_size, NULL, &err);
|
||||
auto temp_buffer =
|
||||
clCreateBuffer(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_uint) * work_size, NULL, &err);
|
||||
RETURN_ON_CL_ERROR(err, "clCreateBuffer")
|
||||
|
||||
err = clSetKernelArg(kernel, 0, sizeof(output_buffer), &output_buffer);
|
||||
|
||||
Reference in New Issue
Block a user