check and adjust FFT selection for KOKKOS depending on whether CUDA is enabled or not

This commit is contained in:
Axel Kohlmeyer 2020-01-13 11:09:37 -05:00
parent 88448ef950
commit a7720124db
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 24 additions and 0 deletions

View File

@ -19,12 +19,36 @@
#include "remap_kokkos.h"
#include "fftdata_kokkos.h"
// with KOKKOS in CUDA mode we can only have
// CUFFT or KISSFFT, thus undefine all other
// FFTs here, since they may be valid in fft3d.cpp
#if defined(KOKKOS_ENABLE_CUDA)
# if defined(FFT_FFTW)
# undef FFT_FFTW
# endif
# if defined(FFT_FFTW3)
# undef FFT_FFTW3
# endif
# if defined(FFT_MKL)
# undef FFT_MKL
# endif
# if !defined(FFT_CUFFT) && !defined(FFT_KISSFFT)
# define FFT_KISSFFT
# endif
#else
# if defined(FFT_CUFFT)
# error "Must enable CUDA with KOKKOS to use -DFFT_CUFFT"
# endif
#endif
// if user set FFTW, it means FFTW3
#ifdef FFT_FFTW
#define FFT_FFTW3
#endif
#ifdef FFT_FFTW_THREADS
#if !defined(FFT_FFTW3)
#error "Must use -DFFT_FFTW3 with -DFFT_FFTW_THREADS"