Просмотр исходного кода

We don't know if cl_device_id is a pointer, so we pass a pointer to the array
of cl_device_id and not a pointer to a local copy.

Cédric Augonnet лет назад: 14
Родитель
Сommit
7dd9f8d00c
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      src/drivers/opencl/driver_opencl.c

+ 1 - 3
src/drivers/opencl/driver_opencl.c

@@ -53,13 +53,11 @@ void starpu_opencl_get_queue(int devid, cl_command_queue *queue)
 int _starpu_opencl_init_context(int devid)
 {
 	cl_int err;
-        cl_device_id device;
 
         _STARPU_DEBUG("Initialising context for dev %d\n", devid);
 
         // Create a compute context
-        device = devices[devid];
-        contexts[devid] = clCreateContext(NULL, 1, &device, NULL, NULL, &err);
+        contexts[devid] = clCreateContext(NULL, 1, &devices[devid], NULL, NULL, &err);
         if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
 
         // Create queue for the given device