Prechádzať zdrojové kódy

Only compile CUDA code if STARPU_USE_CUDA is defined

Cédric Augonnet 14 rokov pred
rodič
commit
d8e4ed1724
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      tests/datawizard/lazy_allocation.c

+ 2 - 0
tests/datawizard/lazy_allocation.c

@@ -78,6 +78,7 @@ static void cpu_check_content_codelet(void *descr[], __attribute__ ((unused)) vo
 	}
 }
 
+#ifdef STARPU_USE_CUDA
 static void cuda_check_content_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 {
 	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
@@ -95,6 +96,7 @@ static void cuda_check_content_codelet(void *descr[], __attribute__ ((unused)) v
 		}
 	}
 }
+#endif
 
 static starpu_codelet check_content_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,