Sfoglia il codice sorgente

src/core/perfmodel/perfmodel.c: cpu_node is only set when STARPU_USE_CPU is enabled

Nathalie Furmento 13 anni fa
parent
commit
d295a162b3
1 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. 6 5
      src/core/perfmodel/perfmodel.c

+ 6 - 5
src/core/perfmodel/perfmodel.c

@@ -267,20 +267,21 @@ double starpu_task_expected_conversion_time(struct starpu_task *task,
 		if (!_starpu_data_is_multiformat_handle(handle))
 			continue;
 
+		node = -EINVAL;
+#ifdef STARPU_USE_CPU
 		if (arch < STARPU_CUDA_DEFAULT)
 			node = cpu_node;
+#endif
 #ifdef STARPU_USE_CUDA
-		else if (arch >= STARPU_CUDA_DEFAULT && arch < STARPU_OPENCL_DEFAULT)
+		if (arch >= STARPU_CUDA_DEFAULT && arch < STARPU_OPENCL_DEFAULT)
 			node = cuda_node;
 #endif
 #ifdef STARPU_USE_OPENCL
-		else if (arch >= STARPU_OPENCL_DEFAULT && arch < STARPU_GORDON_DEFAULT)
+		if (arch >= STARPU_OPENCL_DEFAULT && arch < STARPU_GORDON_DEFAULT)
 			node = opencl_node;
 #endif
-		else {
-			node = -EINVAL;
+		if (node == -EINVAL)
 			STARPU_ASSERT(0);
-		}
 
 		if (!_starpu_handle_needs_conversion_task(handle, node))
 			continue;