aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H
blob: f75c9b19a6ecf40acae4c8b47c9632ee91d095f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright 2019 David Grote
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */
#ifndef WARPX_COMPLEXFORFFT_H_
#define WARPX_COMPLEXFORFFT_H_

#include <WarpX_Complex.H>

// Check the complex type on GPU/CPU
#ifdef AMREX_USE_GPU

#include <cufft.h>
static_assert( sizeof(Complex) == sizeof(cuDoubleComplex),
    "The complex types in WarpX and cuFFT do not match.");

#else

#include <fftw3.h>
static_assert( sizeof(Complex) == sizeof(fftw_complex),
    "The complex types in WarpX and FFTW do not match.");

#endif

#endif //WARPX_COMPLEXFORFFT_H_