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:
Jack Frankland
2020-09-01 00:14:10 +02:00
committed by GitHub
parent 3cc9c2c579
commit 581d9ea990
3 changed files with 14 additions and 5 deletions

View File

@@ -59,7 +59,8 @@ test_get_linear_ids(cl_device_id device, cl_context context, cl_command_queue qu
// Create the kernel
error = create_single_kernel_helper_with_build_options(context, &program, &kernel, 1, linear_ids_source, "test_linear_ids", "-cl-std=CL2.0");
error = create_single_kernel_helper(context, &program, &kernel, 1,
linear_ids_source, "test_linear_ids");
if (error)
return error;