42#ifdef NUMERICS_HAS_FFTW
50#if defined(NUMERICS_HAS_AVX2) || defined(NUMERICS_HAS_NEON)
58#ifdef NUMERICS_HAS_STD_SIMD
66#ifdef NUMERICS_HAS_FFTW
68#elif defined(NUMERICS_HAS_AVX2) || defined(NUMERICS_HAS_NEON)
116 int size()
const {
return n_; }
Dense vector with optional GPU storage, templated over scalar type T.
Precomputed plan for repeated complex transforms of a fixed size.
FFTBackend backend() const
FFTPlan(const FFTPlan &)=delete
void execute(const CVector &in, CVector &out) const
FFTPlan & operator=(const FFTPlan &)=delete
void ifft(const CVector &in, CVector &out, FFTBackend b=default_fft_backend)
Inverse complex DFT (unnormalised: result = n * true_inverse).
void fft(const CVector &in, CVector &out, FFTBackend b=default_fft_backend)
Forward complex DFT. out must be pre-allocated to in.size().
FFTBackend
Selects which backend handles an FFT operation.
@ simd
Handwritten AVX2 / NEON butterfly – falls back to seq if unavailable.
@ stdsimd
std::experimental::simd butterfly – requires NUMERICS_HAS_STD_SIMD
@ seq
Native Cooley-Tukey radix-2 DIT – always available (power-of-two only)
@ fftw
FFTW3 (mixed-radix, AVX / NEON optimised) – requires NUMERICS_HAS_FFTW.
void irfft(const CVector &in, int n, Vector &out, FFTBackend b=default_fft_backend)
Complex-to-real inverse DFT (unnormalised).
constexpr bool has_fft_simd
True when handwritten AVX2 or NEON backend is available.
constexpr FFTBackend fftw
constexpr FFTBackend fft_stdsimd
constexpr FFTBackend default_fft_backend
Automatically selected at configure time: fftw > simd > seq.
constexpr FFTBackend fft_simd
void rfft(const Vector &in, CVector &out, FFTBackend b=default_fft_backend)
Real-to-complex forward DFT. out must be pre-allocated to n/2+1.
constexpr bool has_fft_stdsimd
True when std::experimental::simd is available.
constexpr bool has_fftw
True when FFTW3 was found at configure time.
constexpr T ipow(T x) noexcept
Compute x^N at compile time via repeated squaring.