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:
ellnor01
2021-01-07 11:34:42 +00:00
committed by GitHub
parent 85bae70f81
commit 25d9ff5d6e
13 changed files with 111 additions and 231 deletions

View File

@@ -251,11 +251,9 @@ int test_retain_mem_object_set_kernel_arg(cl_device_id deviceID, cl_context cont
err = clSetMemObjectDestructorCallback( buffer, callback, nullptr );
test_error( err, "Unable to set destructor callback" );
err = create_single_kernel_helper( context, &program, nullptr, 1, testProgram, nullptr );
test_error( err, "Unable to build sample program" );
kernel = clCreateKernel( program, "sample_test", &err );
test_error( err, "Unable to create sample_test kernel" );
err = create_single_kernel_helper(context, &program, &kernel, 1,
testProgram, "sample_test");
test_error(err, "Unable to build sample program and sample_test kernel");
err = clSetKernelArg( kernel, 0, sizeof(cl_mem), &buffer );
test_error( err, "Unable to set kernel argument" );