Browse Source

Avoid definining DOUBLE/FLOAT

windows' headers use them.
Samuel Thibault 4 years ago
parent
commit
11ade2e903

+ 2 - 2
starpufft/src/starpufft-double.h

@@ -25,8 +25,8 @@
 #include <cufft.h>
 #include <cufft.h>
 #endif
 #endif
 
 
-#undef  FLOAT
-#define DOUBLE
+#undef  STARPUFFT_FLOAT
+#define STARPUFFT_DOUBLE
 
 
 typedef double real;
 typedef double real;
 #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__) 
 #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__) 

+ 2 - 2
starpufft/src/starpufft-float.h

@@ -25,8 +25,8 @@
 #include <cufft.h>
 #include <cufft.h>
 #endif
 #endif
 
 
-#undef  DOUBLE
-#define FLOAT
+#undef  STARPUFFT_DOUBLE
+#define STARPUFFT_FLOAT
 
 
 typedef float real;
 typedef float real;
 #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__) 
 #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__) 

+ 2 - 2
starpufft/src/starpufftx.c

@@ -28,7 +28,7 @@
 #define _externC extern
 #define _externC extern
 #include "cudax_kernels.h"
 #include "cudax_kernels.h"
 
 
-#if defined(FLOAT) || defined(STARPU_HAVE_CUFFTDOUBLECOMPLEX)
+#if defined(STARPUFFT_FLOAT) || defined(STARPU_HAVE_CUFFTDOUBLECOMPLEX)
 #  define __STARPU_USE_CUDA
 #  define __STARPU_USE_CUDA
 #else
 #else
 #  undef __STARPU_USE_CUDA
 #  undef __STARPU_USE_CUDA
@@ -172,7 +172,7 @@ compute_roots(STARPUFFT(plan) plan)
 }
 }
 
 
 /* Only CUDA capability >= 1.3 supports doubles, rule old card out.  */
 /* Only CUDA capability >= 1.3 supports doubles, rule old card out.  */
-#ifdef DOUBLE
+#ifdef STARPUFFT_DOUBLE
 static int can_execute(unsigned workerid, struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED) {
 static int can_execute(unsigned workerid, struct starpu_task *task STARPU_ATTRIBUTE_UNUSED, unsigned nimpl STARPU_ATTRIBUTE_UNUSED) {
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 		return 1;
 		return 1;