瀏覽代碼

Make sure we call an implementation

Samuel Thibault 14 年之前
父節點
當前提交
8b92ec20cf
共有 3 個文件被更改,包括 12 次插入18 次删除
  1. 4 6
      src/drivers/cpu/driver_cpu.c
  2. 4 6
      src/drivers/cuda/driver_cuda.c
  3. 4 6
      src/drivers/opencl/driver_opencl.c

+ 4 - 6
src/drivers/cpu/driver_cpu.c

@@ -62,12 +62,10 @@ static int execute_job_on_cpu(starpu_job_t j, struct starpu_worker_s *cpu_args,
 			func(task->interfaces, task->cl_arg);
 		}
 		else {
-			if (cl->cpu_funcs[j->nimpl] != NULL) {
-				/* _STARPU_DEBUG("CPU driver : running kernel (%d)\n", j->nimpl); */
-				cl_func func = cl->cpu_funcs[j->nimpl];
-				STARPU_ASSERT(func);
-				func(task->interfaces, task->cl_arg);
-			}
+			/* _STARPU_DEBUG("CPU driver : running kernel (%d)\n", j->nimpl); */
+			cl_func func = cl->cpu_funcs[j->nimpl];
+			STARPU_ASSERT(func);
+			func(task->interfaces, task->cl_arg);
 		}
 	}
 

+ 4 - 6
src/drivers/cuda/driver_cuda.c

@@ -218,12 +218,10 @@ static int execute_job_on_cuda(starpu_job_t j, struct starpu_worker_s *args)
 		func(task->interfaces, task->cl_arg);
 	}
 	else {
-		if (cl->cuda_funcs[j->nimpl] != NULL) {
-			/* _STARPU_DEBUG("Cuda driver : running kernel * (%d)\n", j->nimpl); */
-			cl_func func = cl->cuda_funcs[j->nimpl];
-			STARPU_ASSERT(func);
-			func(task->interfaces, task->cl_arg);
-		}
+		/* _STARPU_DEBUG("Cuda driver : running kernel * (%d)\n", j->nimpl); */
+		cl_func func = cl->cuda_funcs[j->nimpl];
+		STARPU_ASSERT(func);
+		func(task->interfaces, task->cl_arg);
 	}
 
 	_starpu_driver_end_job(args, j, &codelet_end, 0);

+ 4 - 6
src/drivers/opencl/driver_opencl.c

@@ -575,12 +575,10 @@ static int _starpu_opencl_execute_job(starpu_job_t j, struct starpu_worker_s *ar
 		func(task->interfaces, task->cl_arg);
 	}
 	else {
-		if (cl->opencl_funcs[j->nimpl] != NULL) {
-			/* _STARPU_DEBUG("OpenCL driver : running kernel (%d)\n", j->nimpl); */
-			cl_func func = cl->opencl_funcs[j->nimpl];
-			STARPU_ASSERT(func);
-			func(task->interfaces, task->cl_arg);
-		}
+		/* _STARPU_DEBUG("OpenCL driver : running kernel (%d)\n", j->nimpl); */
+		cl_func func = cl->opencl_funcs[j->nimpl];
+		STARPU_ASSERT(func);
+		func(task->interfaces, task->cl_arg);
 	}
 
 	_starpu_driver_end_job(args, j, &codelet_end, 0);