Browse Source

Multiformat example : return 77 when no cuda devices are available.

Cyril Roelandt 13 years ago
parent
commit
1bff9ebbf7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      examples/basic_examples/multiformat.c

+ 3 - 0
examples/basic_examples/multiformat.c

@@ -195,6 +195,9 @@ main(void)
 #ifdef STARPU_USE_CPU
 	starpu_init(NULL);
 
+	if (starpu_cuda_worker_get_count() == 0)
+		return 77;
+
 #ifdef STARPU_USE_OPENCL
 	starpu_opencl_load_opencl_from_file("examples/basic_examples/multiformat_opencl_kernel.cl",
 					    &opencl_program, NULL);