kernelHelpers - add error checking and return if failed

This commit is contained in:
Grzegorz Wawiorko
2020-07-16 12:19:37 +02:00
committed by Alastair Murray
parent f1dd503c6c
commit 7db81be9a0

View File

@@ -675,9 +675,9 @@ static int create_single_kernel_helper_create_program_offline(cl_context context
cl_platform_id platform;
error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM,
sizeof(cl_platform_id), &platform, NULL);
print_error(error, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
test_error(error, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
clGetExtensionFunctionAddressForPlatform(
platform, "clCreateProgramWithILKHR");