Skip to content

Commit

Permalink
Better platform and device loading
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 19, 2020
1 parent b211c30 commit 331d9ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pconvert/opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ERROR_T blend_kernel(
error = clGetPlatformIDs(1, &platform_id, NULL);
if(error != CL_SUCCESS) { RAISE_F("[blend_kernel] Failed to retrieve platform: %d", error); }

error = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_GPU, 1, &device_id, NULL);
error = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU, 1, &device_id, NULL);
if(error != CL_SUCCESS) { RAISE_F("[blend_kernel] Failed to create a device group: %d", error); }

context = clCreateContext(0, 1, &device_id, NULL, NULL, &error);
Expand Down

0 comments on commit 331d9ac

Please sign in to comment.