SourceXtractorPlusPlus
0.16
Please provide a description of the project.
|
Wraps the FFTW API with a more C++ like one. More...
#include <FFT.h>
Public Types | |
typedef FFTTraits< T > | fftw_traits |
typedef std::shared_ptr< typename fftw_traits::plan_t > | plan_ptr_t |
typedef fftw_traits::complex_t | complex_t |
Static Public Member Functions | |
static plan_ptr_t | createForwardPlan (int width, int height, std::vector< T > &inout) |
static plan_ptr_t | createInversePlan (int width, int height, std::vector< T > &inout) |
static void | executeForward (plan_ptr_t &plan, std::vector< T > &inout) |
static void | executeInverse (plan_ptr_t &plan, std::vector< T > &inout) |
Wraps the FFTW API with a more C++ like one.
It builds on top of the FFTTraits as defined previously
T | A floating point type |
typedef fftw_traits::complex_t SourceXtractor::FFT< T >::complex_t |
typedef FFTTraits<T> SourceXtractor::FFT< T >::fftw_traits |
typedef std::shared_ptr<typename fftw_traits::plan_t> SourceXtractor::FFT< T >::plan_ptr_t |
|
static |
Create, or reuses if already exists, a 2D FFTW forward plan.
width | The width of the 2D original data |
height | The height of the 2D original data |
inout | A buffer in row major order, with 2*(width/2 + 1) * height positions. This buffer is passed to FFTW to perform its planning, and will be overwritten. If the memory area is not big enough, createForwardPlan will resize the vector. |
Definition at line 111 of file FFT.cpp.
References std::map< K, T >::emplace(), std::map< K, T >::end(), SourceXtractor::fftw_global_plan_mutex, std::map< K, T >::find(), std::make_tuple(), and pi.
Referenced by SourceXtractor::DFTConvolution< T, TPadding >::prepare().
|
static |
Create, or reuses if already exists, a 2D FFTW inverse plan.
width | The width of the 2D original data |
height | The height of the 2D original data |
inout | A buffer in row major order, with 2*(width/2 + 1) * height positions. This buffer is passed to FFTW to perform its planning, and will be overwritten. If the memory area is not big enough, createInversePlan will resize the vector. |
Definition at line 151 of file FFT.cpp.
References std::map< K, T >::emplace(), std::map< K, T >::end(), SourceXtractor::fftw_global_plan_mutex, std::map< K, T >::find(), std::make_tuple(), and pi.
Referenced by SourceXtractor::DFTConvolution< T, TPadding >::prepare().
|
static |
Execute a forward Fourier Transform
plan | A plan as created by createForwardPlan |
inout | A buffer in row major order with the input data. It will be overwritten. |
Definition at line 191 of file FFT.cpp.
References std::vector< T >::data(), and std::shared_ptr< T >::get().
Referenced by SourceXtractor::DFTConvolution< T, TPadding >::convolve(), and SourceXtractor::DFTConvolution< T, TPadding >::prepare().
|
static |
Execute an inverse Fourier Transform
plan | A plan as created by createInversePlan |
inout | A buffer in row major order with the input data. It will be overwritten. |
Definition at line 196 of file FFT.cpp.
References std::vector< T >::data(), and std::shared_ptr< T >::get().
Referenced by SourceXtractor::DFTConvolution< T, TPadding >::convolve().