#ifndef WARPX_COMPLEX_H_ #define WARPX_COMPLEX_H_ #include // Define complex type on GPU/CPU #ifdef AMREX_USE_GPU #include #include using Complex = thrust::complex; static_assert( sizeof(Complex) == sizeof(cuDoubleComplex), "The complex types in WarpX and cuFFT do not match."); #else #include #include using Complex = std::complex; static_assert( sizeof(Complex) == sizeof(fftw_complex), "The complex types in WarpX and FFTW do not match."); #endif static_assert(sizeof(Complex) == sizeof(amrex::Real[2]), "Unexpected complex type."); #endif //WARPX_COMPLEX_H_