|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
Wrapper around FFTW. More...
#include <fftw_wrapper.hpp>
Classes | |
| struct | InternalPlanType |
Public Types | |
| using | InputType = InputTypeT |
| using | OutputType = ToComplex< InputType > |
| using | RealType = ToReal< InputType > |
| using | ComplexType = ToComplex< InputType > |
| using | TraitsType = FFTWTraits< InputType, ToComplex< InputType > > |
| using | RealMatType = El::Matrix< RealType, El::Device::CPU > |
| using | ComplexMatType = El::Matrix< ComplexType, El::Device::CPU > |
| using | InputMatType = El::Matrix< InputType, El::Device::CPU > |
| using | OutputMatType = El::Matrix< OutputType, El::Device::CPU > |
| using | PlanType = typename TraitsType::plan_type |
Public Member Functions | |
| FFTWWrapper ()=default | |
| ~FFTWWrapper ()=default | |
| FFTWWrapper (FFTWWrapper &&other) noexcept=default | |
| FFTWWrapper (FFTWWrapper const &)=delete | |
| void | setup_forward (InputMatType &in, OutputMatType &out, std::vector< int > const &full_dims) |
| Setup the forward transform. More... | |
| void | setup_forward (InputMatType &in, std::vector< int > const &full_dims) |
| Setup an in-place forward transform. More... | |
| void | setup_backward (OutputMatType &in, InputMatType &out, std::vector< int > const &full_dims) |
| Setup the backward (inverse) transform. More... | |
| void | setup_backward (OutputMatType &in, std::vector< int > const &full_dims) |
| Setup the in-place backward (inverse) transform. More... | |
| void | compute_forward (InputMatType &in, OutputMatType &out) const |
| void | compute_forward (InputMatType &in) const |
| void | compute_backward (OutputMatType &in, InputMatType &out) const |
| void | compute_backward (OutputMatType &in) const |
Private Member Functions | |
| template<typename InMatT , typename OutMatT , typename SetupManyFunctorT , typename SetupGuruFunctorT > | |
| void | setup_common (InMatT &in, OutMatT &out, std::vector< int > const &full_dims, std::vector< InternalPlanType > &plans, SetupManyFunctorT many_functor, SetupGuruFunctorT guru_functor) |
Private Attributes | |
| std::vector< InternalPlanType > | fwd_plans_ |
| std::vector< InternalPlanType > | bwd_plans_ |
Wrapper around FFTW.
The main constraint is that the sample data to which the DFT will be applied must be fully packed. Batches do not need to be fully packed, but all lower dimensions do. For example, to compute the DFT of each feature map in a batch of N samples with C feature maps of size HxW per sample, the input matrix must have width N and each column must be CHW-packed, in the cuDNN sense.
Definition at line 208 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::ComplexMatType = El::Matrix<ComplexType, El::Device::CPU> |
Definition at line 219 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::ComplexType = ToComplex<InputType> |
Definition at line 215 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::InputMatType = El::Matrix<InputType, El::Device::CPU> |
Definition at line 221 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::InputType = InputTypeT |
Definition at line 211 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::OutputMatType = El::Matrix<OutputType, El::Device::CPU> |
Definition at line 222 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::OutputType = ToComplex<InputType> |
Definition at line 212 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::PlanType = typename TraitsType::plan_type |
Definition at line 224 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::RealMatType = El::Matrix<RealType, El::Device::CPU> |
Definition at line 218 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::RealType = ToReal<InputType> |
Definition at line 214 of file fftw_wrapper.hpp.
| using lbann::fftw::FFTWWrapper< InputTypeT >::TraitsType = FFTWTraits<InputType, ToComplex<InputType> > |
Definition at line 216 of file fftw_wrapper.hpp.
|
default |
|
default |
|
defaultnoexcept |
|
delete |
|
inline |
|
inline |
Definition at line 356 of file fftw_wrapper.hpp.
|
inline |
|
inline |
Definition at line 332 of file fftw_wrapper.hpp.
|
inline |
Setup the backward (inverse) transform.
| in | Input array; must be allocated, could be overwritten. |
| out | Output array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 290 of file fftw_wrapper.hpp.
|
inline |
Setup the in-place backward (inverse) transform.
| in | Input array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 308 of file fftw_wrapper.hpp.
|
inlineprivate |
|
inline |
Setup the forward transform.
| in | Input array; must be allocated, could be overwritten. |
| out | Output array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 260 of file fftw_wrapper.hpp.
|
inline |
Setup an in-place forward transform.
| in | Input array; must be allocated, could be overwritten. |
| full_dims | Fold dimensions for the tensors in columns of in/out. The format is expected to be [num_feature_maps, feature_map_dims]. |
Definition at line 277 of file fftw_wrapper.hpp.
|
private |
Definition at line 463 of file fftw_wrapper.hpp.
|
private |
Definition at line 462 of file fftw_wrapper.hpp.