Browse Source

do not even compile the gpu_partiton example if we don't have cuda

Andra Hugo 8 years ago
parent
commit
149d06b650
2 changed files with 7 additions and 8 deletions
  1. 5 6
      examples/Makefile.am
  2. 2 2
      examples/sched_ctx/gpu_partition.c

+ 5 - 6
examples/Makefile.am

@@ -243,8 +243,7 @@ STARPU_EXAMPLES +=				\
 	sched_ctx/dummy_sched_with_ctx		\
 	worker_collections/worker_tree_example  \
 	reductions/dot_product			\
-	reductions/minmax_reduction		\
-	sched_ctx/gpu_partition
+	reductions/minmax_reduction		
 
 endif
 
@@ -352,11 +351,11 @@ endif
 
 endif !STARPU_SIMGRID
 
-sched_ctx_gpu_partition_SOURCES =		\
-	sched_ctx/gpu_partition.c
-
 if STARPU_USE_CUDA
-sched_ctx_gpu_partition_SOURCES +=		\
+STARPU_EXAMPLES +=				\
+	sched_ctx/gpu_partition
+sched_ctx_gpu_partition_SOURCES =		\
+	sched_ctx/gpu_partition.c		\
 	sched_ctx/axpy_partition_gpu.cu
 endif
 

+ 2 - 2
examples/sched_ctx/gpu_partition.c

@@ -71,8 +71,8 @@ static struct starpu_perfmodel axpy_model =
 
 static struct starpu_codelet axpy_cl =
 {
-	.cpu_funcs = {axpy_cpu},
-	.cpu_funcs_name = {"axpy_cpu"},
+	/* .cpu_funcs = {axpy_cpu}, */
+	/* .cpu_funcs_name = {"axpy_cpu"}, */
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = {cuda_axpy},
 #elif defined(STARPU_SIMGRID)