Explorar o código

src/core/workers.c: function _starpu_can_use_nth_implementation: add case for STARPU_ANY_WORKER

Nathalie Furmento %!s(int64=12) %!d(string=hai) anos
pai
achega
5af7f31188
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/core/workers.c

+ 8 - 0
src/core/workers.c

@@ -161,6 +161,14 @@ static int _starpu_can_use_nth_implementation(enum starpu_archtype arch, struct
 {
 	switch(arch)
 	{
+	case STARPU_ANY_WORKER:
+	{
+		starpu_cpu_func_t cpu_func = _starpu_task_get_cpu_nth_implementation(cl, nimpl);
+		starpu_cuda_func_t cuda_func = _starpu_task_get_cuda_nth_implementation(cl, nimpl);
+		starpu_opencl_func_t opencl_func = _starpu_task_get_opencl_nth_implementation(cl, nimpl);
+		starpu_gordon_func_t gordon_func = _starpu_task_get_gordon_nth_implementation(cl, nimpl);
+		return (cpu_func != NULL && cuda_func != NULL && opencl_func != NULL && gordon_func != NULL);
+	}
 	case STARPU_CPU_WORKER:
 	{
 		starpu_cpu_func_t func = _starpu_task_get_cpu_nth_implementation(cl, nimpl);