Browse Source

Fix build without CUDA.

Cyril Roelandt 13 years ago
parent
commit
6558e0795e
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/core/workers.c

+ 8 - 1
src/core/workers.c

@@ -929,8 +929,15 @@ extern int _starpu_run_cuda(struct starpu_driver *);
 int
 starpu_run_driver(struct starpu_driver *d)
 {
-	if (!d || d->type != STARPU_CUDA_WORKER)
+	if (!d)
+		return -EINVAL;
+
+#ifdef STARPU_USE_CUDA
+	if (d->type != STARPU_CUDA_WORKER)
 		return -EINVAL;
 
 	return _starpu_run_cuda(d);
+#else
+	return -ENODEV;
+#endif
 }