|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Precomputed FFT plan for repeated transforms of the same size. More...
#include <fft.H>
Public Member Functions | |
| Plan ()=default | |
| Constructs an empty plan (size 0). | |
| Plan (const size_t n) | |
Constructs a plan for transforms of size n. | |
| Plan (const Plan &other)=default | |
| Copy the tables of another plan. | |
| Plan (Plan &&other) noexcept | |
| Take the tables of another plan, which is left empty (size 0). | |
| Plan & | operator= (const Plan &other)=default |
| Copy the tables of another plan. | |
| Plan & | operator= (Plan &&other) noexcept |
| Exchange this plan with another, which is left with the previous tables of this one. | |
| void | swap (Plan &other) noexcept |
| Exchange in O(1) the tables of this plan and another. | |
| size_t | size () const noexcept |
| Returns the transform size this plan was built for. | |
| void | transform (Array< Complex > &a, const bool invert) const |
| Computes the FFT or IFFT in-place using precomputed tables. | |
| Array< Complex > | transformed (const Array< Complex > &input, const bool invert=false) const |
| Computes the FFT or IFFT returning a new array. | |
| Array< Complex > | inverse_transform (const Array< Complex > &input) const |
| Returns the inverse transform as a new array. | |
| Array< Real > | inverse_transform_real (const Array< Complex > &input) const |
| Returns the IFFT projected back to real values. | |
| Array< Real > | pinverse_transform_real (ThreadPool &pool, const Array< Complex > &input, const size_t chunk_size=0) const |
| Parallel IFFT projected back to real values. | |
| void | ptransform (ThreadPool &pool, Array< Complex > &a, const bool invert, const size_t chunk_size=0) const |
| Parallel in-place transform using a thread pool. | |
| Array< Complex > | ptransformed (ThreadPool &pool, const Array< Complex > &input, const bool invert=false, const size_t chunk_size=0) const |
| Parallel transform returning a new array. | |
| Array< Complex > | pinverse_transform (ThreadPool &pool, const Array< Complex > &input, const size_t chunk_size=0) const |
| Parallel inverse transform returning a new array. | |
| void | transform_batch (Array< Array< Complex > > &batch, const bool invert, const bool prefer_simd=true) const |
| In-place batch transform for equal-length complex inputs. | |
| void | ptransform_batch (ThreadPool &pool, Array< Array< Complex > > &batch, const bool invert, const size_t chunk_size=0, const bool prefer_simd=true) const |
| Parallel batch transform for equal-length complex inputs. | |
| Array< Array< Complex > > | transformed_batch (const Array< Array< Complex > > &input, const bool invert=false, const bool prefer_simd=true) const |
| Returns the batch FFT/IFFT as a new array of arrays. | |
| Array< Array< Complex > > | ptransformed_batch (ThreadPool &pool, const Array< Array< Complex > > &input, const bool invert=false, const size_t chunk_size=0, const bool prefer_simd=true) const |
| Returns the parallel batch FFT/IFFT as a new array of arrays. | |
| Array< Array< Complex > > | inverse_transform_batch (const Array< Array< Complex > > &input) const |
| Returns the inverse batch transform as a new array of arrays. | |
| Array< Array< Complex > > | pinverse_transform_batch (ThreadPool &pool, const Array< Array< Complex > > &input, const size_t chunk_size=0, const bool prefer_simd=true) const |
| Returns the parallel inverse batch transform. | |
| Array< Array< Real > > | inverse_transform_real_batch (const Array< Array< Complex > > &input) const |
| Returns the inverse batch transform projected back to real values. | |
| Array< Array< Real > > | pinverse_transform_real_batch (ThreadPool &pool, const Array< Array< Complex > > &input, const size_t chunk_size=0, const bool prefer_simd=true) const |
| Returns the parallel inverse batch transform projected back to real values. | |
| Array< Complex > | rfft (const Array< Real > &input) const |
| Computes the Real-to-Complex FFT (RFFT). | |
| Array< Complex > | prfft (ThreadPool &pool, const Array< Real > &input, const size_t chunk_size=0) const |
| Parallel Real-to-Complex FFT (RFFT). | |
| Array< Real > | irfft (const Array< Complex > &spectrum) const |
| Computes the Complex-to-Real Inverse FFT (IRFFT). | |
| Array< Real > | pirfft (ThreadPool &pool, const Array< Complex > &spectrum, const size_t chunk_size=0) const |
| Parallel Complex-to-Real Inverse FFT (IRFFT). | |
| Array< Array< Complex > > | rfft_batch (const Array< Array< Real > > &input) const |
| Computes a batch of Real-to-Complex FFTs. | |
| Array< Array< Complex > > | prfft_batch (ThreadPool &pool, const Array< Array< Real > > &input, const size_t chunk_size=0) const |
| Computes a parallel batch of Real-to-Complex FFTs. | |
| Array< Array< Real > > | irfft_batch (const Array< Array< Complex > > &spectra) const |
| Computes a batch of Complex-to-Real Inverse FFTs. | |
| Array< Array< Real > > | pirfft_batch (ThreadPool &pool, const Array< Array< Complex > > &spectra, const size_t chunk_size=0) const |
| Computes a parallel batch of Complex-to-Real Inverse FFTs. | |
Private Types | |
| enum class | Strategy { empty , power_of_two , mixed_radix , bluestein } |
Private Member Functions | |
| void | initialize_power_of_two_plan () |
| void | initialize_mixed_radix_plan () |
| void | initialize_bluestein_plan () |
| void | apply_bit_reversal (Array< Complex > &a) const noexcept |
| bool | automatic_batch_simd_candidate (const size_t batch_size) const noexcept |
| bool | should_use_avx2 (ThreadPool *pool, const bool prefer_simd) const noexcept |
| bool | should_use_neon (ThreadPool *pool, const bool prefer_simd) const noexcept |
| void | apply_butterflies (Array< Complex > &a, const bool invert, ThreadPool *pool, const size_t chunk_size, const bool prefer_simd) const |
| void | apply_transform (Array< Complex > &a, const bool invert, ThreadPool *pool, const size_t chunk_size, const bool prefer_simd) const |
| Complex | root_for_length (const size_t length, const size_t exponent, const bool invert) const |
| Array< Complex > | mixed_radix_transform_recursive (const Array< Complex > &input, const size_t factor_index, const size_t current_size, const bool invert) const |
| void | apply_mixed_radix_transform (Array< Complex > &a, const bool invert) const |
| void | apply_bluestein_transform (Array< Complex > &a, const bool invert, ThreadPool *pool, const size_t chunk_size) const |
| bool | supports_power_of_two_real_optimization () const noexcept |
Private Attributes | |
| size_t | n_ = 0 |
| Strategy | strategy_ = Strategy::empty |
| size_t | log_n_ = 0 |
| Array< size_t > | bit_rev_ |
| Array< Complex > | twiddles_ |
| std::shared_ptr< const Plan > | half_plan_ |
| Array< size_t > | factors_ |
| Array< Complex > | roots_ |
| size_t | bluestein_size_ = 0 |
| Array< Complex > | bluestein_chirp_ |
| Array< Complex > | bluestein_kernel_forward_ |
| Array< Complex > | bluestein_kernel_inverse_ |
| std::shared_ptr< const Plan > | bluestein_plan_ |
Precomputed FFT plan for repeated transforms of the same size.
A Plan precomputes the state needed for a given transform size N. Power-of-two sizes cache the bit-reversal permutation and radix-2/radix-4 twiddle tables. Other sizes cache either a mixed-radix factorization or the Bluestein convolution kernel. Subsequent calls to transform reuse these tables instead of rebuilding them.
This is beneficial when multiple transforms of the same size are performed (e.g., streaming audio, sliding-window spectral analysis).
|
strongprivate |
|
default |
Constructs an empty plan (size 0).
|
inlineexplicit |
Constructs a plan for transforms of size n.
Precomputes the bit-reversal permutation and all twiddle factors. Construction cost is O(N).
| n | Transform size (must be positive). |
| std::invalid_argument | if n is zero. |
Definition at line 7280 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::empty, Aleph::FFT< Real >::factor_small_radices(), Aleph::FFT< Real >::Plan::factors_, Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), Aleph::FFT< Real >::Plan::initialize_mixed_radix_plan(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), Aleph::Array< T >::is_empty(), Aleph::FFT< Real >::is_power_of_two(), Aleph::FFT< Real >::Plan::n_, and Aleph::FFT< Real >::Plan::strategy_.
|
default |
Copy the tables of another plan.
| [in] | other | plan to copy. |
| std::bad_alloc | if the tables cannot be allocated. |
|
inlinenoexcept |
Take the tables of another plan, which is left empty (size 0).
The implicit move took the tables but copied the size and the strategy: the moved-from plan then read a bit-reversal table that it no longer had.
| [in,out] | other | plan to move from. |
|
inlineprivatenoexcept |
Definition at line 6430 of file fft.H.
References Aleph::FFT< Real >::Plan::bit_rev_, and Aleph::FFT< Real >::Plan::n_.
Referenced by Aleph::FFT< Real >::Plan::apply_transform().
|
inlineprivate |
Definition at line 7197 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::Plan::bluestein_chirp_, Aleph::FFT< Real >::Plan::bluestein_kernel_forward_, Aleph::FFT< Real >::Plan::bluestein_kernel_inverse_, Aleph::FFT< Real >::Plan::bluestein_plan_, Aleph::FFT< Real >::Plan::bluestein_size_, Aleph::Array< T >::create(), Aleph::FFT< Real >::Plan::n_, Aleph::ThreadPool::num_threads(), and Aleph::parallel_for_index().
Referenced by Aleph::FFT< Real >::Plan::apply_transform().
|
inlineprivate |
Definition at line 6924 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::Plan::n_, Aleph::ThreadPool::num_threads(), Aleph::parallel_for_index(), r, Aleph::FFT< Real >::Plan::should_use_avx2(), Aleph::FFT< Real >::Plan::should_use_neon(), and Aleph::FFT< Real >::Plan::twiddles_.
Referenced by Aleph::FFT< Real >::Plan::apply_transform().
|
inlineprivate |
Definition at line 7184 of file fft.H.
References Aleph::FFT< Real >::Plan::mixed_radix_transform_recursive(), Aleph::FFT< Real >::Plan::n_, and output.
Referenced by Aleph::FFT< Real >::Plan::apply_transform().
|
inlineprivate |
Definition at line 7098 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::apply_bit_reversal(), Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::apply_butterflies(), Aleph::FFT< Real >::Plan::apply_mixed_radix_transform(), Aleph::FFT< Real >::Plan::bluestein, Aleph::FFT< Real >::Plan::empty, Aleph::FFT< Real >::Plan::mixed_radix, Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::power_of_two, Aleph::Array< T >::size(), and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::ptransform(), Aleph::FFT< Real >::Plan::ptransform_batch(), Aleph::FFT< Real >::Plan::transform(), and Aleph::FFT< Real >::Plan::transform_batch().
|
inlineprivatenoexcept |
Definition at line 6856 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::power_of_two, and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::ptransform_batch(), and Aleph::FFT< Real >::Plan::transform_batch().
|
inlineprivate |
Definition at line 6390 of file fft.H.
References Aleph::FFT< Real >::Plan::bluestein, Aleph::FFT< Real >::Plan::bluestein_chirp_, Aleph::FFT< Real >::Plan::bluestein_kernel_forward_, Aleph::FFT< Real >::Plan::bluestein_kernel_inverse_, Aleph::FFT< Real >::Plan::bluestein_plan_, Aleph::FFT< Real >::Plan::bluestein_size_, Aleph::Array< T >::create(), Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::next_power_of_two(), Aleph::FFT< Real >::Plan::strategy_, and value.
Referenced by Aleph::FFT< Real >::Plan::Plan().
|
inlineprivate |
Definition at line 6378 of file fft.H.
References Aleph::Array< T >::create(), Aleph::FFT< Real >::Plan::mixed_radix, Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::roots_, and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::Plan().
|
inlineprivate |
Definition at line 6342 of file fft.H.
References Aleph::FFT< Real >::Plan::bit_rev_, Aleph::Array< T >::create(), Aleph::FFT< Real >::Plan::half_plan_, Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::Plan::n_, offset, Aleph::FFT< Real >::Plan::power_of_two, Aleph::FFT< Real >::Plan::strategy_, and Aleph::FFT< Real >::Plan::twiddles_.
Referenced by Aleph::FFT< Real >::Plan::Plan().
|
inline |
Returns the inverse transform as a new array.
Definition at line 7408 of file fft.H.
References Aleph::FFT< Real >::Plan::transformed().
|
inline |
Returns the inverse batch transform as a new array of arrays.
Definition at line 7593 of file fft.H.
References Aleph::FFT< Real >::Plan::transformed_batch().
|
inline |
Returns the IFFT projected back to real values.
| std::domain_error | if the result has non-negligible imaginary parts. |
Definition at line 7419 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::half_plan_, Aleph::FFT< Real >::inverse_transform_real_optimized_impl(), Aleph::FFT< Real >::Plan::n_, output, Aleph::FFT< Real >::project_real_output(), Aleph::Array< T >::size(), Aleph::FFT< Real >::Plan::supports_power_of_two_real_optimization(), Aleph::FFT< Real >::Plan::transform(), and Aleph::FFT< Real >::validate_real_spectrum().
Referenced by Aleph::FFT< Real >::OverlapAdd::convolve_impl(), Aleph::FFT< Real >::Plan::inverse_transform_real_batch(), Aleph::FFT< Real >::Plan::irfft(), Aleph::FFT< Real >::istft_impl(), Aleph::FFT< Real >::Plan::pinverse_transform_real_batch(), Aleph::FFT< Real >::OverlapAdd::process_chunk_impl(), Aleph::FFT< Real >::OverlapSave::process_chunk_impl(), Aleph::FFT< Real >::ISTFTProcessor::process_frame_impl(), and Aleph::FFT< Real >::PartitionedConvolver::process_partition_impl().
|
inline |
Returns the inverse batch transform projected back to real values.
Definition at line 7612 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::Plan::n_, output, and Aleph::FFT< Real >::Plan::size().
Referenced by Aleph::FFT< Real >::OverlapAddBank::convolve_impl(), Aleph::FFT< Real >::Plan::irfft_batch(), and Aleph::FFT< Real >::OverlapAddBank::process_chunk_batch_impl().
|
inline |
Computes the Complex-to-Real Inverse FFT (IRFFT).
| spectrum | Compact complex spectrum (size N/2 + 1). |
Definition at line 7696 of file fft.H.
References Aleph::FFT< Real >::expand_real_spectrum(), Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::Plan::n_, and Aleph::FFT< Real >::spectrum().
|
inline |
Computes a batch of Complex-to-Real Inverse FFTs.
Definition at line 7735 of file fft.H.
References Aleph::FFT< Real >::expand_real_batch_spectra(), Aleph::FFT< Real >::Plan::inverse_transform_real_batch(), and Aleph::FFT< Real >::Plan::n_.
Referenced by Aleph::FFT< Real >::irfft_batch().
|
inlineprivate |
Definition at line 7143 of file fft.H.
References Aleph::Array< T >::append(), Aleph::Array< T >::create(), Aleph::FFT< Real >::Plan::factors_, Aleph::FFT< Real >::Plan::mixed_radix_transform_recursive(), output, Aleph::Array< T >::reserve(), Aleph::FFT< Real >::Plan::root_for_length(), and Aleph::sum().
Referenced by Aleph::FFT< Real >::Plan::apply_mixed_radix_transform(), and Aleph::FFT< Real >::Plan::mixed_radix_transform_recursive().
|
default |
Copy the tables of another plan.
| [in] | other | plan to copy. |
| std::bad_alloc | if the tables cannot be allocated. |
|
inlinenoexcept |
Exchange this plan with another, which is left with the previous tables of this one.
| [in,out] | other | plan to move from. |
Definition at line 7351 of file fft.H.
References Aleph::FFT< Real >::Plan::swap().
|
inline |
Parallel inverse transform returning a new array.
Definition at line 7501 of file fft.H.
References Aleph::FFT< Real >::Plan::ptransformed().
|
inline |
Returns the parallel inverse batch transform.
Definition at line 7600 of file fft.H.
References Aleph::FFT< Real >::Plan::ptransformed_batch().
|
inline |
Parallel IFFT projected back to real values.
Definition at line 7444 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::half_plan_, Aleph::FFT< Real >::inverse_transform_real_optimized_impl(), Aleph::FFT< Real >::Plan::n_, output, Aleph::FFT< Real >::project_real_output(), Aleph::FFT< Real >::Plan::ptransform(), Aleph::Array< T >::size(), Aleph::FFT< Real >::Plan::supports_power_of_two_real_optimization(), and Aleph::FFT< Real >::validate_real_spectrum().
Referenced by Aleph::FFT< Real >::OverlapAdd::convolve_impl(), Aleph::FFT< Real >::istft_impl(), Aleph::FFT< Real >::Plan::pinverse_transform_real_batch(), Aleph::FFT< Real >::Plan::pirfft(), Aleph::FFT< Real >::OverlapAdd::process_chunk_impl(), and Aleph::FFT< Real >::ISTFTProcessor::process_frame_impl().
|
inline |
Returns the parallel inverse batch transform projected back to real values.
Definition at line 7630 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::Plan::n_, Aleph::ThreadPool::num_threads(), output, Aleph::parallel_for_index(), Aleph::FFT< Real >::Plan::pinverse_transform_real(), and Aleph::FFT< Real >::Plan::size().
Referenced by Aleph::FFT< Real >::OverlapAddBank::convolve_impl(), Aleph::FFT< Real >::Plan::pirfft_batch(), and Aleph::FFT< Real >::OverlapAddBank::process_chunk_batch_impl().
|
inline |
Parallel Complex-to-Real Inverse FFT (IRFFT).
Definition at line 7705 of file fft.H.
References Aleph::FFT< Real >::expand_real_spectrum(), Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::pinverse_transform_real(), and Aleph::FFT< Real >::spectrum().
|
inline |
Computes a parallel batch of Complex-to-Real Inverse FFTs.
Definition at line 7743 of file fft.H.
References Aleph::FFT< Real >::expand_real_batch_spectra(), Aleph::FFT< Real >::Plan::n_, and Aleph::FFT< Real >::Plan::pinverse_transform_real_batch().
Referenced by Aleph::FFT< Real >::pirfft_batch().
|
inline |
Parallel Real-to-Complex FFT (RFFT).
Definition at line 7678 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::compact_real_spectrum(), Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::project_to_plan_spectrum(), and Aleph::Array< T >::size().
|
inline |
Computes a parallel batch of Real-to-Complex FFTs.
Definition at line 7725 of file fft.H.
References Aleph::FFT< Real >::compact_real_batch_spectra(), and Aleph::FFT< Real >::project_to_plan_batch_spectra().
Referenced by Aleph::FFT< Real >::prfft_batch().
|
inline |
Parallel in-place transform using a thread pool.
| pool | Thread pool for parallel butterfly stages. |
| a | Array of complex values (size must equal plan size). |
| invert | If true, compute the inverse transform. |
| chunk_size | Minimum iterations per parallel chunk (0 = auto). |
Definition at line 7481 of file fft.H.
References Aleph::FFT< Real >::Plan::apply_transform().
Referenced by Aleph::FFT< Real >::OverlapAdd::convolve_impl(), Aleph::FFT< Real >::Plan::pinverse_transform_real(), Aleph::FFT< Real >::OverlapAdd::process_chunk_impl(), Aleph::FFT< Real >::project_to_plan_spectrum(), Aleph::FFT< Real >::Plan::ptransformed(), Aleph::FFT< Real >::transform_any_size_impl(), and Aleph::FFT< Real >::transform_axis_impl().
|
inline |
Parallel batch transform for equal-length complex inputs.
When the batch has more than one item, parallelism is applied across batch elements and each individual transform runs sequentially to avoid nested thread-pool oversubscription.
Definition at line 7532 of file fft.H.
References ah_invalid_argument_if, Aleph::and, Aleph::FFT< Real >::Plan::apply_transform(), Aleph::FFT< Real >::Plan::automatic_batch_simd_candidate(), Aleph::FFT< Real >::Plan::n_, Aleph::ThreadPool::num_threads(), Aleph::parallel_for_index(), and Aleph::FFT< Real >::Plan::size().
Referenced by Aleph::FFT< Real >::OverlapAddBank::convolve_impl(), Aleph::FFT< Real >::OverlapAddBank::process_chunk_batch_impl(), Aleph::FFT< Real >::project_to_plan_batch_spectra(), Aleph::FFT< Real >::ptransform_batch(), Aleph::FFT< Real >::Plan::ptransformed_batch(), and Aleph::FFT< Real >::transform_stft_frames().
|
inline |
Parallel transform returning a new array.
Definition at line 7490 of file fft.H.
References output, and Aleph::FFT< Real >::Plan::ptransform().
Referenced by Aleph::FFT< Real >::Plan::pinverse_transform().
|
inline |
Returns the parallel batch FFT/IFFT as a new array of arrays.
Definition at line 7580 of file fft.H.
References output, and Aleph::FFT< Real >::Plan::ptransform_batch().
Referenced by Aleph::FFT< Real >::Plan::pinverse_transform_batch().
|
inline |
Computes the Real-to-Complex FFT (RFFT).
Returns the compact spectrum (size N/2 + 1) for a real input.
| input | Real input array (size must equal plan size). |
Definition at line 7668 of file fft.H.
References ah_invalid_argument_if, Aleph::FFT< Real >::compact_real_spectrum(), Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::project_to_plan_spectrum(), and Aleph::Array< T >::size().
|
inline |
Computes a batch of Real-to-Complex FFTs.
Definition at line 7717 of file fft.H.
References Aleph::FFT< Real >::compact_real_batch_spectra(), and Aleph::FFT< Real >::project_to_plan_batch_spectra().
Referenced by Aleph::FFT< Real >::rfft_batch().
|
inlineprivate |
Definition at line 7129 of file fft.H.
References Aleph::FFT< Real >::Plan::n_, root(), and Aleph::FFT< Real >::Plan::roots_.
Referenced by Aleph::FFT< Real >::Plan::mixed_radix_transform_recursive().
|
inlineprivatenoexcept |
Definition at line 6865 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::automatic, Aleph::FFT< Real >::avx2, Aleph::FFT< Real >::avx2_only, Aleph::FFT< Real >::detected_simd_backend(), Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::neon_only, Aleph::FFT< Real >::Plan::power_of_two, Aleph::FFT< Real >::scalar_only, Aleph::FFT< Real >::simd_preference(), and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::apply_butterflies().
|
inlineprivatenoexcept |
Definition at line 6894 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::automatic, Aleph::FFT< Real >::avx2_only, Aleph::FFT< Real >::detected_simd_backend(), Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::neon, Aleph::FFT< Real >::neon_only, Aleph::FFT< Real >::Plan::power_of_two, Aleph::FFT< Real >::scalar_only, Aleph::FFT< Real >::simd_preference(), and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::apply_butterflies().
|
inlinenoexcept |
Returns the transform size this plan was built for.
Definition at line 7378 of file fft.H.
References Aleph::FFT< Real >::Plan::n_.
Referenced by Aleph::FFT< Real >::Plan::inverse_transform_real_batch(), Aleph::FFT< Real >::Plan::pinverse_transform_real_batch(), Aleph::FFT< Real >::Plan::ptransform_batch(), and Aleph::FFT< Real >::Plan::transform_batch().
|
inlineprivatenoexcept |
Definition at line 7261 of file fft.H.
References Aleph::and, Aleph::FFT< Real >::Plan::half_plan_, Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::power_of_two, and Aleph::FFT< Real >::Plan::strategy_.
Referenced by Aleph::FFT< Real >::Plan::inverse_transform_real(), and Aleph::FFT< Real >::Plan::pinverse_transform_real().
|
inlinenoexcept |
Exchange in O(1) the tables of this plan and another.
| [in,out] | other | plan to exchange with. |
Definition at line 7360 of file fft.H.
References Aleph::FFT< Real >::Plan::bit_rev_, Aleph::FFT< Real >::Plan::bluestein_chirp_, Aleph::FFT< Real >::Plan::bluestein_kernel_forward_, Aleph::FFT< Real >::Plan::bluestein_kernel_inverse_, Aleph::FFT< Real >::Plan::bluestein_plan_, Aleph::FFT< Real >::Plan::bluestein_size_, Aleph::FFT< Real >::Plan::factors_, Aleph::FFT< Real >::Plan::half_plan_, Aleph::FFT< Real >::Plan::log_n_, Aleph::FFT< Real >::Plan::n_, Aleph::FFT< Real >::Plan::roots_, Aleph::FFT< Real >::Plan::strategy_, Aleph::Array< T >::swap(), and Aleph::FFT< Real >::Plan::twiddles_.
Referenced by Aleph::FFT< Real >::Plan::operator=(), Aleph::FFT< Real >::ISTFTProcessor::swap(), Aleph::FFT< Real >::OverlapAdd::swap(), Aleph::FFT< Real >::OverlapAddBank::swap(), Aleph::FFT< Real >::OverlapSave::swap(), Aleph::FFT< Real >::PartitionedConvolver::swap(), and Aleph::FFT< Real >::STFTProcessor::swap().
|
inline |
Computes the FFT or IFFT in-place using precomputed tables.
| a | Array of complex values (size must equal plan size). |
| invert | If true, compute the inverse transform (with 1/N scaling). |
| std::invalid_argument | if a.size() differs from plan size. |
Definition at line 7386 of file fft.H.
References Aleph::FFT< Real >::Plan::apply_transform().
Referenced by Aleph::FFT< Real >::OverlapAdd::OverlapAdd(), Aleph::FFT< Real >::OverlapAddBank::OverlapAddBank(), Aleph::FFT< Real >::OverlapSave::OverlapSave(), Aleph::FFT< Real >::PartitionedConvolver::PartitionedConvolver(), Aleph::FFT< Real >::OverlapAdd::convolve_impl(), Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::OverlapAdd::process_chunk_impl(), Aleph::FFT< Real >::OverlapSave::process_chunk_impl(), Aleph::FFT< Real >::PartitionedConvolver::process_partition_impl(), Aleph::FFT< Real >::project_to_plan_spectrum(), Aleph::FFT< Real >::transform_any_size_impl(), Aleph::FFT< Real >::transform_axis_impl(), and Aleph::FFT< Real >::Plan::transformed().
|
inline |
In-place batch transform for equal-length complex inputs.
Definition at line 7509 of file fft.H.
References ah_invalid_argument_if, Aleph::and, Aleph::FFT< Real >::Plan::apply_transform(), Aleph::FFT< Real >::Plan::automatic_batch_simd_candidate(), Aleph::FFT< Real >::Plan::n_, and Aleph::FFT< Real >::Plan::size().
Referenced by Aleph::FFT< Real >::OverlapAddBank::convolve_impl(), Aleph::FFT< Real >::OverlapAddBank::process_chunk_batch_impl(), Aleph::FFT< Real >::project_to_plan_batch_spectra(), Aleph::FFT< Real >::transform_batch(), Aleph::FFT< Real >::transform_stft_frames(), and Aleph::FFT< Real >::Plan::transformed_batch().
|
inline |
Computes the FFT or IFFT returning a new array.
| input | Input array (size must equal plan size). |
| invert | If true, compute the inverse transform. |
Definition at line 7398 of file fft.H.
References output, and Aleph::FFT< Real >::Plan::transform().
Referenced by Aleph::FFT< Real >::Plan::inverse_transform().
|
inline |
Returns the batch FFT/IFFT as a new array of arrays.
Definition at line 7569 of file fft.H.
References output, and Aleph::FFT< Real >::Plan::transform_batch().
Referenced by Aleph::FFT< Real >::Plan::inverse_transform_batch().
|
private |
Definition at line 6330 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bit_reversal(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6336 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6337 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6338 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6339 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6335 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6333 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::Plan(), Aleph::FFT< Real >::Plan::mixed_radix_transform_recursive(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6332 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::Plan::pinverse_transform_real(), Aleph::FFT< Real >::Plan::supports_power_of_two_real_optimization(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6329 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_butterflies(), Aleph::FFT< Real >::Plan::automatic_batch_simd_candidate(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), Aleph::FFT< Real >::Plan::should_use_avx2(), Aleph::FFT< Real >::Plan::should_use_neon(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6327 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::Plan(), Aleph::FFT< Real >::Plan::apply_bit_reversal(), Aleph::FFT< Real >::Plan::apply_bluestein_transform(), Aleph::FFT< Real >::Plan::apply_butterflies(), Aleph::FFT< Real >::Plan::apply_mixed_radix_transform(), Aleph::FFT< Real >::Plan::apply_transform(), Aleph::FFT< Real >::Plan::automatic_batch_simd_candidate(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), Aleph::FFT< Real >::Plan::initialize_mixed_radix_plan(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), Aleph::FFT< Real >::Plan::inverse_transform_real(), Aleph::FFT< Real >::Plan::inverse_transform_real_batch(), Aleph::FFT< Real >::Plan::irfft(), Aleph::FFT< Real >::Plan::irfft_batch(), Aleph::FFT< Real >::Plan::pinverse_transform_real(), Aleph::FFT< Real >::Plan::pinverse_transform_real_batch(), Aleph::FFT< Real >::Plan::pirfft(), Aleph::FFT< Real >::Plan::pirfft_batch(), Aleph::FFT< Real >::Plan::prfft(), Aleph::FFT< Real >::Plan::ptransform_batch(), Aleph::FFT< Real >::Plan::rfft(), Aleph::FFT< Real >::Plan::root_for_length(), Aleph::FFT< Real >::Plan::size(), Aleph::FFT< Real >::Plan::supports_power_of_two_real_optimization(), Aleph::FFT< Real >::Plan::swap(), and Aleph::FFT< Real >::Plan::transform_batch().
|
private |
Definition at line 6334 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::initialize_mixed_radix_plan(), Aleph::FFT< Real >::Plan::root_for_length(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6328 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::Plan(), Aleph::FFT< Real >::Plan::apply_transform(), Aleph::FFT< Real >::Plan::automatic_batch_simd_candidate(), Aleph::FFT< Real >::Plan::initialize_bluestein_plan(), Aleph::FFT< Real >::Plan::initialize_mixed_radix_plan(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), Aleph::FFT< Real >::Plan::should_use_avx2(), Aleph::FFT< Real >::Plan::should_use_neon(), Aleph::FFT< Real >::Plan::supports_power_of_two_real_optimization(), and Aleph::FFT< Real >::Plan::swap().
|
private |
Definition at line 6331 of file fft.H.
Referenced by Aleph::FFT< Real >::Plan::apply_butterflies(), Aleph::FFT< Real >::Plan::initialize_power_of_two_plan(), and Aleph::FFT< Real >::Plan::swap().