LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A wrapper for FFTW plans for fast Fourier transforms. More...
#include <FourierTransform.h>
Public Types | |
typedef boost::shared_ptr < FourierTransform > | Ptr |
typedef detail::FourierTraits < T >::ElementX | ElementX |
Real-space array data type;. More... | |
typedef detail::FourierTraits < T >::ElementK | ElementK |
Fourier-space array data type;. More... | |
typedef Vector< int, N > | Index |
Shape type for arrays. More... | |
typedef Array< ElementX, N, N > | ArrayX |
Real-space array type. More... | |
typedef Array< ElementK, N, N > | ArrayK |
Fourier-space array type. More... | |
typedef Vector< int, N+1 > | MultiplexIndex |
Shape type for multiplexed arrays. More... | |
typedef Array< ElementX, N+1, N+1 > | MultiplexArrayX |
Real-space multiplexed array type. More... | |
typedef Array< ElementK, N+1, N+1 > | MultiplexArrayK |
Fourier-space multiplexed array type. More... | |
Public Member Functions | |
void | execute () |
Execute the FFTW plan. More... | |
~FourierTransform () | |
template<int M> | |
Array< typename FourierTransform< T, N > ::ElementX, M, M > | initializeX (Vector< int, M > const &shape) |
template<int M> | |
Array< typename FourierTransform< T, N > ::ElementK, M, M > | initializeK (Vector< int, M > const &shape) |
Static Public Member Functions | |
static Ptr | planForward (Index const &shape, ArrayX &x, ArrayK &k) |
Create a plan for forward-transforming a single N-dimensional array. More... | |
static Ptr | planInverse (Index const &shape, ArrayK &k, ArrayX &x) |
Create a plan for inverse-transforming a single N-dimensional array. More... | |
static Ptr | planMultiplexForward (MultiplexIndex const &shape, MultiplexArrayX &x, MultiplexArrayK &k) |
Create a plan for forward-transforming a sequence of nested N-dimensional arrays. More... | |
static Ptr | planMultiplexInverse (MultiplexIndex const &shape, MultiplexArrayK &k, MultiplexArrayX &x) |
Create a plan for inverse-transforming a sequence of nested N-dimensional arrays. More... | |
template<int M> | |
static Array< ElementX, M, M > | initializeX (Vector< int, M > const &shape) |
Create a new real-space array with the given real-space shape. More... | |
template<int M> | |
static Array< ElementK, M, M > | initializeK (Vector< int, M > const &shape) |
Create a new Fourier-space array with the given real-space shape. More... | |
template<int M> | |
static void | initialize (Vector< int, M > const &shape, Array< ElementX, M, M > &x, Array< ElementK, M, M > &k) |
Initialize, as necessary, a pair of arrays with the given real-space shape. More... | |
Private Types | |
typedef boost::shared_ptr < ElementX > | OwnerX |
typedef boost::shared_ptr < ElementK > | OwnerK |
Private Member Functions | |
BOOST_STATIC_ASSERT ((!boost::is_const< T >::value)) | |
FourierTransform (void *plan, Manager::Ptr const &x, Manager::Ptr const &k) | |
Private Attributes | |
void * | _plan |
Manager::Ptr | _x |
Manager::Ptr | _k |
A wrapper for FFTW plans for fast Fourier transforms.
An instance of FourierTransform holds an FFTW "plan", providing repeated forward or inverse FFTs of predetermined arrays.
Multiplex plans can also be generated to perform an N-dimensional FFT on the nested arrays of an (N+1)-dimensional array.
Static member functions of FourierTransform are used to create instances, and optionally initialize the involved arrays.
Definition at line 54 of file FourierTransform.h.
typedef Array<ElementK,N,N> ndarray::FourierTransform< T, N >::ArrayK |
Fourier-space array type.
Definition at line 65 of file FourierTransform.h.
typedef Array<ElementX,N,N> ndarray::FourierTransform< T, N >::ArrayX |
Real-space array type.
Definition at line 64 of file FourierTransform.h.
typedef detail::FourierTraits<T>::ElementK ndarray::FourierTransform< T, N >::ElementK |
Fourier-space array data type;.
Definition at line 61 of file FourierTransform.h.
typedef detail::FourierTraits<T>::ElementX ndarray::FourierTransform< T, N >::ElementX |
Real-space array data type;.
Definition at line 60 of file FourierTransform.h.
typedef Vector<int,N> ndarray::FourierTransform< T, N >::Index |
Shape type for arrays.
Definition at line 63 of file FourierTransform.h.
typedef Array<ElementK,N+1,N+1> ndarray::FourierTransform< T, N >::MultiplexArrayK |
Fourier-space multiplexed array type.
Definition at line 68 of file FourierTransform.h.
typedef Array<ElementX,N+1,N+1> ndarray::FourierTransform< T, N >::MultiplexArrayX |
Real-space multiplexed array type.
Definition at line 67 of file FourierTransform.h.
typedef Vector<int,N+1> ndarray::FourierTransform< T, N >::MultiplexIndex |
Shape type for multiplexed arrays.
Definition at line 66 of file FourierTransform.h.
|
private |
Definition at line 141 of file FourierTransform.h.
|
private |
Definition at line 140 of file FourierTransform.h.
typedef boost::shared_ptr<FourierTransform> ndarray::FourierTransform< T, N >::Ptr |
Definition at line 58 of file FourierTransform.h.
ndarray::FourierTransform< T, N >::~FourierTransform | ( | ) |
Definition at line 156 of file FourierTransform.cc.
|
inlineprivate |
Definition at line 143 of file FourierTransform.h.
|
private |
void ndarray::FourierTransform< T, N >::execute | ( | ) |
|
static |
Initialize, as necessary, a pair of arrays with the given real-space shape.
If either array is not empty, it must be consistent with the given shape.
Definition at line 49 of file FourierTransform.cc.
Array<typename FourierTransform<T,N>::ElementK,M,M> ndarray::FourierTransform< T, N >::initializeK | ( | Vector< int, M > const & | shape | ) |
Definition at line 39 of file FourierTransform.cc.
|
static |
Create a new Fourier-space array with the given real-space shape.
Array<typename FourierTransform<T,N>::ElementX,M,M> ndarray::FourierTransform< T, N >::initializeX | ( | Vector< int, M > const & | shape | ) |
Definition at line 31 of file FourierTransform.cc.
|
static |
Create a new real-space array with the given real-space shape.
|
static |
Create a plan for forward-transforming a single N-dimensional array.
Arrays will be initialized with new memory if empty. If they are not empty, existing data may be overwritten when the plan is created.
shape | Shape of the real-space array. |
x | Input real-space array. |
k | Output Fourier-space array. |
Definition at line 62 of file FourierTransform.cc.
|
static |
Create a plan for inverse-transforming a single N-dimensional array.
Arrays will be initialized with new memory if empty. If they are not empty, existing data may be overwritten when the plan is created.
shape | Shape of the real-space array. |
k | Input Fourier-space array. |
x | Output real-space array. |
Definition at line 84 of file FourierTransform.cc.
|
static |
Create a plan for forward-transforming a sequence of nested N-dimensional arrays.
Arrays will be initialized with new memory if empty. If they are not empty, existing data may be overwritten when the plan is created.
shape | Shape of the real-space array. First dimension is multiplexed. |
x | Input real-space array. |
k | Output Fourier-space array. |
Definition at line 106 of file FourierTransform.cc.
|
static |
Create a plan for inverse-transforming a sequence of nested N-dimensional arrays.
Arrays will be initialized with new memory if empty. If they are not empty, existing data may be overwritten when the plan is created.
shape | Shape of the real-space array. First dimension is multiplexed. |
k | Input Fourier-space array. |
x | Output real-space array. |
Definition at line 128 of file FourierTransform.cc.
|
private |
Definition at line 148 of file FourierTransform.h.
|
private |
Definition at line 146 of file FourierTransform.h.
|
private |
Definition at line 147 of file FourierTransform.h.