Explorar o código

fix example build without cuda

Samuel Thibault %!s(int64=13) %!d(string=hai) anos
pai
achega
4f964bb632
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      examples/reductions/dot_product.c

+ 2 - 0
examples/reductions/dot_product.c

@@ -43,11 +43,13 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 	const struct cudaDeviceProp *props;
 	const struct cudaDeviceProp *props;
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 		return 1;
 		return 1;
+#ifdef STARPU_USE_CUDA
 	/* Cuda device */
 	/* Cuda device */
 	props = starpu_cuda_get_device_properties(workerid);
 	props = starpu_cuda_get_device_properties(workerid);
 	if (props->major >= 2 || props->minor >= 3)
 	if (props->major >= 2 || props->minor >= 3)
 		/* At least compute capability 1.3, supports doubles */
 		/* At least compute capability 1.3, supports doubles */
 		return 0;
 		return 0;
+#endif
 	/* Old card, does not support doubles */
 	/* Old card, does not support doubles */
 	return 0;
 	return 0;
 }
 }