Browse Source

Fix multi-implementation function checking, thanks Usman for the patch

Samuel Thibault 12 years ago
parent
commit
24f5129856
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/core/workers.c

+ 3 - 3
src/core/workers.c

@@ -84,15 +84,15 @@ static uint32_t _starpu_worker_exists_and_can_execute(struct starpu_task *task,
 			switch (arch)
 			{
 			case STARPU_CPU_WORKER:
-				if (task->cl->cpu_funcs[i] != NULL)
+				if (task->cl->cpu_funcs[impl] != NULL)
 					test_implementation = 1;
 				break;
 			case STARPU_CUDA_WORKER:
-				if (task->cl->cuda_funcs[i] != NULL)
+				if (task->cl->cuda_funcs[impl] != NULL)
 					test_implementation = 1;
 				break;
 			case STARPU_OPENCL_WORKER:
-				if (task->cl->opencl_funcs[i] != NULL)
+				if (task->cl->opencl_funcs[impl] != NULL)
 					test_implementation = 1;
 				break;
 			default: