Class dft_plan¶
class dft_plan<T> dft¶
template <typename T>
struct dft_plan { … } Class for performing 1D DFT/FFT.
| T | Template parameter specifying the floating-point type. Must be either float or double ; other types are not supported. |
variable size ¶
size_t size The size of the DFT as passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::size
Declared at dft/fft.hpp:241
variable temp_size ¶
size_t temp_size The temporary (scratch) buffer size for the DFT plan.
Note
Preallocating a byte buffer of this size and passing its pointer to the execute function may improve performance.
Fully qualified name: kfr::dft_plan<T>::temp_size
Declared at dft/fft.hpp:246
constructor dft_plan<T>() ¶
dft_plan() Constructs an empty DFT plan.
This default constructor ensures the type is default-constructible.
Fully qualified name: kfr::dft_plan<T>::dft_plan<T>()
Declared at dft/fft.hpp:253
constructor dft_plan<T>(const dft_plan<T> &) ¶
dft_plan(const dft_plan&) = delete Copy constructor (deleted).
Fully qualified name: kfr::dft_plan<T>::dft_plan<T>(const dft_plan<T> &)
Declared at dft/fft.hpp:263
function operator=(const dft_plan<T> &) ¶
Copy assignment operator (deleted).
Fully qualified name: kfr::dft_plan<T>::operator=(const dft_plan<T> &)
Declared at dft/fft.hpp:270
constructor dft_plan<T>(dft_plan<T> &&) ¶
dft_plan(dft_plan&&) = default Move constructor.
Fully qualified name: kfr::dft_plan<T>::dft_plan<T>(dft_plan<T> &&)
Declared at dft/fft.hpp:275
function operator=(dft_plan<T> &&) ¶
Move assignment operator.
Fully qualified name: kfr::dft_plan<T>::operator=(dft_plan<T> &&)
Declared at dft/fft.hpp:280
function is_initialized() ¶
bool is_initialized() const Checks whether the plan is non-empty.
true if the plan was constructed with a specific DFT size, false otherwise. |
Fully qualified name: kfr::dft_plan<T>::is_initialized()
Declared at dft/fft.hpp:287
constructor dft_plan<T>(size_t, dft_order, bool) ¶
explicit dft_plan(size_t size, dft_order order = dft_order::normal, bool progressive_optimized = false) Constructs a DFT plan with the specified size and order.
| size | The size of the DFT. |
| order | The order of the DFT samples. See dft_order (currently ignored). |
| progressive_optimized | If true, the plan will be optimized for progressive execution. |
Fully qualified name: kfr::dft_plan<T>::dft_plan<T>(size_t, dft_order, bool)
Declared at dft/fft.hpp:296
function dump() ¶
void dump() const Dumps details of the DFT plan to stdout for inspection.
May be used to determine the selected architecture at runtime and the chosen DFT algorithms.
Fully qualified name: kfr::dft_plan<T>::dump()
Declared at dft/fft.hpp:307
function execute(complex<T> *, const complex<T> *, u8 *, bool) ¶
Execute the complex DFT on in and write the result to out .
| out | Pointer to the output data. |
| in | Pointer to the input data. |
| temp | Temporary (scratch) buffer. If nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated (on stack or heap) for the duration of the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(complex<T> *, const complex<T> *, u8 *, bool)
Declared at dft/fft.hpp:319
destructor ~dft_plan<T>() ¶
~dft_plan() function execute(complex<T> *, const complex<T> *, u8 *, cbool_t<inverse>) ¶
template <bool inverse>
KFR_MEM_INTRINSIC void execute(complex<T>* out, const complex<T>* in, u8* temp,
cbool_t<inverse> inv) const Execute the complex DFT on in and write the result to out .
| out | Pointer to the output data. |
| in | Pointer to the input data. |
| temp | Temporary (scratch) buffer. If nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated (on stack or heap) for the duration of the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(complex<T> *, const complex<T> *, u8 *, cbool_t<inverse>)
Declared at dft/fft.hpp:347
function execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, univector<u8, Tag3> &, bool) ¶
template <univector_tag Tag1, univector_tag Tag2, univector_tag Tag3>
KFR_MEM_INTRINSIC void execute(univector<complex<T>, Tag1>& out, const univector<complex<T>, Tag2>& in,
univector<u8, Tag3>& temp, bool inverse = false) const Execute the complex DFT on in and write the result to out .
| out | Output univector. |
| in | Input univector. |
| temp | Temporary (scratch) buffer univector. If its storage is nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated for the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, univector<u8, Tag3> &, bool)
Declared at dft/fft.hpp:364
function execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, univector<u8, Tag3> &, cbool_t<inverse>) ¶
template <bool inverse, univector_tag Tag1, univector_tag Tag2, univector_tag Tag3>
KFR_MEM_INTRINSIC void execute(univector<complex<T>, Tag1>& out, const univector<complex<T>, Tag2>& in,
univector<u8, Tag3>& temp, cbool_t<inverse> inv) const Execute the complex DFT on in and write the result to out .
| out | Output univector. |
| in | Input univector. |
| temp | Temporary (scratch) buffer univector. If its storage is nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated for the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, univector<u8, Tag3> &, cbool_t<inverse>)
Declared at dft/fft.hpp:384
function execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, u8 *, bool) ¶
template <univector_tag Tag1, univector_tag Tag2>
KFR_MEM_INTRINSIC void execute(univector<complex<T>, Tag1>& out, const univector<complex<T>, Tag2>& in,
u8* temp, bool inverse = false) const Execute the complex DFT on in and write the result to out .
| out | Output univector. |
| in | Input univector. |
| temp | Temporary (scratch) buffer. If nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated (on stack or heap) for the duration of the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, u8 *, bool)
Declared at dft/fft.hpp:401
function execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, u8 *, cbool_t<inverse>) ¶
template <bool inverse, univector_tag Tag1, univector_tag Tag2>
KFR_MEM_INTRINSIC void execute(univector<complex<T>, Tag1>& out, const univector<complex<T>, Tag2>& in,
u8* temp, cbool_t<inverse> inv) const Execute the complex DFT on in and write the result to out .
| out | Output univector. |
| in | Input univector. |
| temp | Temporary (scratch) buffer. If nullptr and temp_size > 0 , a scratch buffer of temp_size bytes is allocated (on stack or heap) for the duration of the call. |
| inverse | If true, apply the inverse DFT. |
Note
No scaling is applied. This function reads \(N\) complex values from in and writes \(N\) complex values to out , where \(N\) is the size passed to the constructor.
Fully qualified name: kfr::dft_plan<T>::execute(univector<complex<T>, Tag1> &, const univector<complex<T>, Tag2> &, u8 *, cbool_t<inverse>)
Declared at dft/fft.hpp:421
variable data ¶
variable data_size ¶
size_t data_size variable all_stages ¶
std::vector<dft_stage_ptr<T>> all_stages variable stages ¶
variable arblen ¶
bool arblen True if Bluestein's FFT algorithm is selected.
Fully qualified name: kfr::dft_plan<T>::arblen
Declared at dft/fft.hpp:432
variable progressive_optimized ¶
bool progressive_optimized True if the plan is for progressive execution of the DFT.
Fully qualified name: kfr::dft_plan<T>::progressive_optimized
Declared at dft/fft.hpp:433
typedef bitset ¶
using bitset = std::bitset<DFT_MAX_STAGES> Fully qualified name: kfr::dft_plan<T>::bitset
Declared at dft/fft.hpp:434
variable disposition_inplace ¶
Internal data.
Fully qualified name: kfr::dft_plan<T>::disposition_inplace
Declared at dft/fft.hpp:435
variable disposition_outofplace ¶
Internal data.
Fully qualified name: kfr::dft_plan<T>::disposition_outofplace
Declared at dft/fft.hpp:436
function calc_disposition() ¶
void calc_disposition() Internal function
Fully qualified name: kfr::dft_plan<T>::calc_disposition()
Declared at dft/fft.hpp:439
function precompute_disposition(int, bitset, bool) ¶
static bitset precompute_disposition(int num_stages, bitset can_inplace_per_stage,
bool inplace_requested) Internal function
Fully qualified name: kfr::dft_plan<T>::precompute_disposition(int, bitset, bool)
Declared at dft/fft.hpp:442
struct noinit ¶
struct noinit { … } Fully qualified name: kfr::dft_plan<T>::noinit
Declared at dft/fft.hpp:529
constructor dft_plan<T>(noinit, size_t, dft_order, bool) ¶
explicit dft_plan(noinit, size_t size, dft_order order = dft_order::normal,
bool progressive_optimized = false) Fully qualified name: kfr::dft_plan<T>::dft_plan<T>(noinit, size_t, dft_order, bool)
Declared at dft/fft.hpp:532
function execute_dft(cbool_t<inverse>, complex<T> *, const complex<T> *, u8 *) ¶
template <bool inverse>
KFR_INTRINSIC void execute_dft(cbool_t<inverse>, complex<T>* out, const complex<T>* in, u8* temp) const Fully qualified name: kfr::dft_plan<T>::execute_dft(cbool_t<inverse>, complex<T> *, const complex<T> *, u8 *)
Declared at dft/fft.hpp:539
Fully qualified name: kfr::dft_plan<T>
Declared at dft/fft.hpp:238