소스 검색

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 년 전
부모
커밋
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