mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 22:19:02 +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:
@@ -28,14 +28,11 @@ int test_release_kernel_order(cl_device_id deviceID, cl_context context, cl_comm
|
||||
int error;
|
||||
const char *testProgram[] = { "__kernel void sample_test(__global int *data){}" };
|
||||
|
||||
/* Create a test program */
|
||||
error = create_single_kernel_helper(context, &program, NULL, 1, testProgram, NULL);
|
||||
/* Create a test program and kernel from it */
|
||||
error = create_single_kernel_helper(context, &program, &kernel, 1,
|
||||
testProgram, "sample_test");
|
||||
test_error( error, "Unable to build sample program to test with" );
|
||||
|
||||
/* And create a kernel from it */
|
||||
kernel = clCreateKernel( program, "sample_test", &error );
|
||||
test_error( error, "Unable to create kernel" );
|
||||
|
||||
/* Now try freeing the program first, then the kernel. If refcounts are right, this should work just fine */
|
||||
clReleaseProgram( program );
|
||||
clReleaseKernel( kernel );
|
||||
|
||||
Reference in New Issue
Block a user