Move FFT defines to use cmakedefine01
authorErik Lindahl <erik@kth.se>
Mon, 6 Jul 2015 12:56:23 +0000 (14:56 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 8 Jul 2015 12:11:23 +0000 (14:11 +0200)
Change-Id: Ie9fface5ea2ec365aa740cfe60243d195e1039ba

src/config.h.cmakein
src/gromacs/fft/fft.cpp
src/gromacs/fft/fft5d.cpp
src/gromacs/fft/fft5d.h
src/gromacs/fft/fft_fftw3.cpp

index 971bbd6d7d2ac1ce14a4567304d1295d637fd82a..51f3fb0ec646243814a9a51a566639ec0a7012bd 100644 (file)
 #cmakedefine GMX_BROKEN_CALLOC
 
 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
-#cmakedefine GMX_DISABLE_FFTW_MEASURE
-
-/* Use Built-in FFTPACK FFT library */
-#cmakedefine GMX_FFT_FFTPACK
+#cmakedefine01 GMX_DISABLE_FFTW_MEASURE
 
 /* Use FFTW3 FFT library */
-#cmakedefine GMX_FFT_FFTW3
-
-/* Use Intel MKL FFT library */
-#cmakedefine GMX_FFT_MKL
+#cmakedefine01 GMX_FFT_FFTW3
 
 /* Target platform is x86 or x86_64 */
 #cmakedefine GMX_TARGET_X86
index 2d8a81e17b58b2df9c82c4429eb7e1bbc966842f..9ead1601ff498473d61d36b4d0f1c8f097db2b95 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2003 Erik Lindahl, David van der Spoel, University of Groningen.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,7 @@
  * files like fft_fftw3.c or fft_mkl.c for that.
  */
 
-#ifndef GMX_FFT_FFTW3
+#if !GMX_FFT_FFTW3
 
 struct gmx_many_fft {
     int       howmany;
index 38b105a76164480d0a03a325a9bcbef4af3f0c9f..4982dfbf59656ca99206740cbd802e1255bb187b 100644 (file)
@@ -77,7 +77,8 @@
 FILE* debug = 0;
 #endif
 
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
+
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/mutex.h"
 /* none of the fftw3 calls, except execute(), are thread-safe, so
@@ -451,7 +452,7 @@ fft5d_plan fft5d_plan_3d(int NG, int MG, int KG, MPI_Comm comm[2], int flags, t_
         fprintf(debug, "Running on %d threads\n", nthreads);
     }
 
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
     /* Don't add more stuff here! We have already had at least one bug because we are reimplementing
      * the low-level FFT interface instead of using the Gromacs FFT module. If we need more
      * generic functionality it is far better to extend the interface so we can use it for
@@ -613,7 +614,7 @@ fft5d_plan fft5d_plan_3d(int NG, int MG, int KG, MPI_Comm comm[2], int flags, t_
         }
     }
 
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
 }
 #endif
     if ((flags&FFT5D_ORDER_YZ))   /*plan->cart is in the order of transposes */
@@ -984,7 +985,7 @@ void fft5d_execute(fft5d_plan plan, int thread, fft5d_time times)
     int    s = 0, tstart, tend, bParallelDim;
 
 
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
     if (plan->p3d)
     {
         if (thread == 0)
@@ -1276,7 +1277,7 @@ void fft5d_destroy(fft5d_plan plan)
             plan->oNout[s] = 0;
         }
     }
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
     FFTW_LOCK;
 #ifdef FFT5D_MPI_TRANSPOS
     for (s = 0; s < 2; s++)
index ba6753d473e453058e79caa75be20ce7f8fd537c..ceb87ddc89cea61c3b76ef960162eede02218e3d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2012,2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,7 @@ double MPI_Wtime();
 #endif
 
 /*currently only special optimization for FFTE*/
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
 #include <fftw3.h>
 #endif
 
@@ -93,7 +93,7 @@ struct fft5d_plan_t {
     t_complex *lin;
     t_complex *lout, *lout2, *lout3;
     gmx_fft_t* p1d[3]; /*1D plans*/
-#ifdef GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3
     FFTW(plan) p2d;    /*2D plan: used for 1D decomposition if FFT supports transposed output*/
     FFTW(plan) p3d;    /*3D plan: used for 0D decomposition if FFT supports transposed output*/
     FFTW(plan) mpip[2];
index 2c1f0b80db0634243d2cb7942c7c249230aa7d03..891a7ee2d9b4bb0e093dfa061d3326512a7d8c27 100644 (file)
@@ -114,7 +114,7 @@ gmx_fft_init_many_1d(gmx_fft_t *        pfft,
     int                    i, j, k;
     int                    fftw_flags;
 
-#ifdef GMX_DISABLE_FFTW_MEASURE
+#if GMX_DISABLE_FFTW_MEASURE
     flags |= GMX_FFT_FLAG_CONSERVATIVE;
 #endif
 
@@ -231,7 +231,7 @@ gmx_fft_init_many_1d_real(gmx_fft_t *        pfft,
     int                    i, j, k;
     int                    fftw_flags;
 
-#ifdef GMX_DISABLE_FFTW_MEASURE
+#if GMX_DISABLE_FFTW_MEASURE
     flags |= GMX_FFT_FLAG_CONSERVATIVE;
 #endif
 
@@ -342,7 +342,7 @@ gmx_fft_init_2d_real(gmx_fft_t *        pfft,
     int                    i, j, k;
     int                    fftw_flags;
 
-#ifdef GMX_DISABLE_FFTW_MEASURE
+#if GMX_DISABLE_FFTW_MEASURE
     flags |= GMX_FFT_FLAG_CONSERVATIVE;
 #endif