mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 07:39:01 +00:00
Using helper functions for clCreateKernel (#1064)
* Using helper functions for clCreateKernel Uses of clCreateKernel following create program helper functions, have been incorporated into create_single_kernel_helper when suitable. Contributes #31 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * Skip tests using clCompileProgram in offline mode Contributes #31 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * Using type wrappers when using kernel helper functions Also includes fix for windows build Fixes #31 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> * Remove clReleaseKernel for wrapped kernel Fixes #31 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
This commit is contained in:
@@ -89,13 +89,9 @@ int test_fmath(cl_device_id deviceID,
|
||||
{
|
||||
// Run the cl kernel for reference results
|
||||
clProgramWrapper prog;
|
||||
err = create_single_kernel_helper_create_program(context, &prog, 1, &kernelBuf, NULL);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create cl program");
|
||||
|
||||
err = clBuildProgram(prog, 1, &deviceID, NULL, NULL, NULL);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to build program");
|
||||
|
||||
clKernelWrapper kernel = clCreateKernel(prog, "fmath_cl", &err);
|
||||
clKernelWrapper kernel;
|
||||
err = create_single_kernel_helper(context, &prog, &kernel, 1,
|
||||
&kernelBuf, "fmath_cl");
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create cl kernel");
|
||||
|
||||
clMemWrapper ref = clCreateBuffer(context, CL_MEM_READ_WRITE, bytes, NULL, &err);
|
||||
|
||||
Reference in New Issue
Block a user