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

@@ -91,14 +91,17 @@ test_work_group_all(cl_device_id device, cl_context context, cl_command_queue qu
input_ptr[0] = (cl_float*)malloc(sizeof(cl_float) * (num_elements+1));
output_ptr = (cl_int*)malloc(sizeof(cl_int) * (num_elements+1));
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * (num_elements+1), NULL, NULL );
streams[0] =
clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * (num_elements + 1), NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -91,14 +91,17 @@ test_work_group_any(cl_device_id device, cl_context context, cl_command_queue qu
input_ptr[0] = (cl_float*)malloc(sizeof(cl_float) * (num_elements+1));
output_ptr = (cl_int*)malloc(sizeof(cl_int) * (num_elements+1));
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * (num_elements+1), NULL, NULL );
streams[0] =
clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * (num_elements + 1), NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -186,14 +186,16 @@ test_work_group_broadcast_1D(cl_device_id device, cl_context context, cl_command
input_ptr[0] = (cl_float*)malloc(sizeof(cl_float) * num_elements);
output_ptr = (cl_float*)malloc(sizeof(cl_float) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -311,14 +313,16 @@ test_work_group_broadcast_2D(cl_device_id device, cl_context context, cl_command
input_ptr[0] = (cl_float*)malloc(sizeof(cl_float) * num_elements);
output_ptr = (cl_float*)malloc(sizeof(cl_float) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -435,14 +439,16 @@ test_work_group_broadcast_3D(cl_device_id device, cl_context context, cl_command
input_ptr[0] = (cl_float*)malloc(sizeof(cl_float) * num_elements);
output_ptr = (cl_float*)malloc(sizeof(cl_float) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_float) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_float) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -188,14 +188,16 @@ test_work_group_reduce_add_int(cl_device_id device, cl_context context, cl_comma
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -289,14 +291,16 @@ test_work_group_reduce_add_uint(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -389,14 +393,16 @@ test_work_group_reduce_add_long(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -490,14 +496,16 @@ test_work_group_reduce_add_ulong(cl_device_id device, cl_context context, cl_com
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -197,14 +197,16 @@ test_work_group_reduce_max_int(cl_device_id device, cl_context context, cl_comma
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -307,14 +309,16 @@ test_work_group_reduce_max_uint(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -416,14 +420,16 @@ test_work_group_reduce_max_long(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -526,14 +532,16 @@ test_work_group_reduce_max_ulong(cl_device_id device, cl_context context, cl_com
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -197,14 +197,16 @@ test_work_group_reduce_min_int(cl_device_id device, cl_context context, cl_comma
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -307,14 +309,16 @@ test_work_group_reduce_min_uint(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -416,14 +420,16 @@ test_work_group_reduce_min_long(cl_device_id device, cl_context context, cl_comm
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -526,14 +532,16 @@ test_work_group_reduce_min_ulong(cl_device_id device, cl_context context, cl_com
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -196,14 +196,16 @@ test_work_group_scan_exclusive_add_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -297,14 +299,16 @@ test_work_group_scan_exclusive_add_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -397,14 +401,16 @@ test_work_group_scan_exclusive_add_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -498,14 +504,16 @@ test_work_group_scan_exclusive_add_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -196,14 +196,16 @@ test_work_group_scan_exclusive_max_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -306,14 +308,16 @@ test_work_group_scan_exclusive_max_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -415,14 +419,16 @@ test_work_group_scan_exclusive_max_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -525,14 +531,16 @@ test_work_group_scan_exclusive_max_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -197,14 +197,16 @@ test_work_group_scan_exclusive_min_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -307,14 +309,16 @@ test_work_group_scan_exclusive_min_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -416,14 +420,16 @@ test_work_group_scan_exclusive_min_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -526,14 +532,16 @@ test_work_group_scan_exclusive_min_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -185,14 +185,16 @@ test_work_group_scan_inclusive_add_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -286,14 +288,16 @@ test_work_group_scan_inclusive_add_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -386,14 +390,16 @@ test_work_group_scan_inclusive_add_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -487,14 +493,16 @@ test_work_group_scan_inclusive_add_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -187,14 +187,16 @@ test_work_group_scan_inclusive_max_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -288,14 +290,16 @@ test_work_group_scan_inclusive_max_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -388,14 +392,16 @@ test_work_group_scan_inclusive_max_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -489,14 +495,16 @@ test_work_group_scan_inclusive_max_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");

View File

@@ -187,14 +187,16 @@ test_work_group_scan_inclusive_min_int(cl_device_id device, cl_context context,
input_ptr[0] = (cl_int*)malloc(sizeof(cl_int) * num_elements);
output_ptr = (cl_int*)malloc(sizeof(cl_int) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_int) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_int) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -288,14 +290,16 @@ test_work_group_scan_inclusive_min_uint(cl_device_id device, cl_context context,
input_ptr[0] = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
output_ptr = (cl_uint*)malloc(sizeof(cl_uint) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_uint) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_uint) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -388,14 +392,16 @@ test_work_group_scan_inclusive_min_long(cl_device_id device, cl_context context,
input_ptr[0] = (cl_long*)malloc(sizeof(cl_long) * num_elements);
output_ptr = (cl_long*)malloc(sizeof(cl_long) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_long) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_long) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");
@@ -489,14 +495,16 @@ test_work_group_scan_inclusive_min_ulong(cl_device_id device, cl_context context
input_ptr[0] = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
output_ptr = (cl_ulong*)malloc(sizeof(cl_ulong) * num_elements);
streams[0] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[0] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[0])
{
log_error("clCreateBuffer failed\n");
return -1;
}
streams[1] = clCreateBuffer( context, (cl_mem_flags)(CL_MEM_READ_WRITE), sizeof(cl_ulong) * num_elements, NULL, NULL );
streams[1] = clCreateBuffer(context, CL_MEM_READ_WRITE,
sizeof(cl_ulong) * num_elements, NULL, NULL);
if (!streams[1])
{
log_error("clCreateBuffer failed\n");