mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Dynamically select -cl-std Build Option for get_(global|local)_linear_id (#876)
* Dynamically select the build option `-cl-std` for the `get_(global|local)_linear_id()` builtin based on the device version of the driver.
This commit is contained in:
@@ -81,9 +81,13 @@ test_local_linear_id(cl_device_id device, cl_context context, cl_command_queue q
|
||||
streams = clCreateBuffer(context, (cl_mem_flags)(CL_MEM_READ_WRITE), length*sizeof(int), NULL, &err);
|
||||
test_error( err, "clCreateBuffer failed.");
|
||||
|
||||
err = create_single_kernel_helper_with_build_options(context, &program[0], &kernel[0], 1, &local_linear_id_1d_code, "test_local_linear_id_1d", "-cl-std=CL2.0");
|
||||
err = create_single_kernel_helper(context, &program[0], &kernel[0], 1,
|
||||
&local_linear_id_1d_code,
|
||||
"test_local_linear_id_1d");
|
||||
test_error( err, "create_single_kernel_helper failed");
|
||||
err = create_single_kernel_helper_with_build_options(context, &program[1], &kernel[1], 1, &local_linear_id_2d_code, "test_local_linear_id_2d", "-cl-std=CL2.0");
|
||||
err = create_single_kernel_helper(context, &program[1], &kernel[1], 1,
|
||||
&local_linear_id_2d_code,
|
||||
"test_local_linear_id_2d");
|
||||
test_error( err, "create_single_kernel_helper failed");
|
||||
|
||||
err = clSetKernelArg(kernel[0], 0, sizeof streams, &streams);
|
||||
|
||||
Reference in New Issue
Block a user