Browse Source

examples/basic_examples/multiformat.c: fix code without cuda and/or opencl

Nathalie Furmento 13 years ago
parent
commit
0caf2e01cd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      examples/basic_examples/multiformat.c

+ 4 - 0
examples/basic_examples/multiformat.c

@@ -138,12 +138,16 @@ create_and_submit_task(unsigned int dev)
 		case STARPU_CPU:
 			task->cl = &cpu_cl;
 			break;
+#ifdef STARPU_USE_CUDA
 		case STARPU_CUDA:
 			task->cl = &cuda_cl;
 			break;
+#endif
+#ifdef STARPU_USE_OPENCL
 		case STARPU_OPENCL:
 			task->cl = &opencl_cl;
 			break;
+#endif
 		default:
 			assert(0);
 	}