Просмотр исходного кода

tests/datawizard/gpu_register.c: when no gpu is enabled, mark test as skipped

Nathalie Furmento лет назад: 13
Родитель
Сommit
040fdff2d2
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      tests/datawizard/gpu_register.c

+ 9 - 0
tests/datawizard/gpu_register.c

@@ -21,6 +21,13 @@
 #include "../helper.h"
 #include "scal.h"
 
+#if ! (defined(STARPU_USE_OPENCL) || defined(STARPU_USE_CUDA))
+int main(int argc, char **argv)
+{
+	return STARPU_TEST_SKIPPED;
+}
+#else
+
 static int
 submit_tasks(starpu_data_handle_t handle, int pieces, int n)
 {
@@ -292,3 +299,5 @@ fail:
 	starpu_shutdown();
 	return EXIT_FAILURE;
 }
+
+#endif /* defined(STARPU_USE_OPENCL) || defined(STARPU_USE_CUDA) */