Sirius  0.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions
sirius::fftw Namespace Reference

Namespaces

 detail
 

Classes

class  Exception
 Exception wrapper for FFTW error. More...
 
class  Fftw
 fftw3 management class More...
 

Typedefs

using PlanUPtr = std::unique_ptr< std::remove_pointer_t<::fftw_plan >, detail::PlanDeleter >
 
using PlanSPtr = std::shared_ptr< std::remove_pointer_t<::fftw_plan > >
 
using ComplexUPtr = std::unique_ptr<::fftw_complex[], detail::ComplexDeleter >
 
using ComplexSPtr = std::shared_ptr<::fftw_complex >
 
using RealUPtr = std::unique_ptr< double[], detail::RealDeleter >
 

Enumerations

enum  ErrorCode {
  ErrorCode::kSuccess = 0, ErrorCode::kMemoryAllocationFailed, ErrorCode::kPlanCreationFailed, ErrorCode::kComplexAllocationFailed,
  ErrorCode::kRealAllocationFailed
}
 FFTW error codes. More...
 

Functions

ComplexUPtr CreateComplex (const Size &size)
 Create complex array and initialize it to 0. More...
 
RealUPtr CreateReal (const Size &size)
 Create real array and initialize it to 0. More...
 
ComplexUPtr FFT (const Image &image)
 Compute the FFT of an image. More...
 
ComplexUPtr FFT (double *values, const Size &size)
 Compute the FFT of real array. More...
 
Image IFFT (const Size &image_size, ComplexUPtr image_fft)
 Compute the IFFT of an image FFT. More...
 

Typedef Documentation

◆ ComplexSPtr

using sirius::fftw::ComplexSPtr = typedef std::shared_ptr<::fftw_complex>

◆ ComplexUPtr

using sirius::fftw::ComplexUPtr = typedef std::unique_ptr<::fftw_complex[], detail::ComplexDeleter>

◆ PlanSPtr

using sirius::fftw::PlanSPtr = typedef std::shared_ptr<std::remove_pointer_t<::fftw_plan> >

◆ PlanUPtr

using sirius::fftw::PlanUPtr = typedef std::unique_ptr<std::remove_pointer_t<::fftw_plan>, detail::PlanDeleter>

◆ RealUPtr

using sirius::fftw::RealUPtr = typedef std::unique_ptr<double[], detail::RealDeleter>

Enumeration Type Documentation

◆ ErrorCode

FFTW error codes.

Enumerator
kSuccess 

success

kMemoryAllocationFailed 

memory allocation failed

kPlanCreationFailed 

plan creation failed

kComplexAllocationFailed 

complex allocation failed

kRealAllocationFailed 

real allocation failed

Function Documentation

◆ CreateComplex()

ComplexUPtr sirius::fftw::CreateComplex ( const Size size)

Create complex array and initialize it to 0.

Parameters
sizecomplex array size
Returns
fftw_complex unique ptr
Exceptions
sirius::fftw::Exceptionif the complex creation fails

◆ CreateReal()

RealUPtr sirius::fftw::CreateReal ( const Size size)

Create real array and initialize it to 0.

Parameters
sizereal array size
Returns
double* unique ptr
Exceptions
sirius::fftw::Exceptionif the real creation fails

◆ FFT() [1/2]

ComplexUPtr sirius::fftw::FFT ( const Image image)

Compute the FFT of an image.

Parameters
imageinput image
Returns
complex array unique ptr
Exceptions
sirius::fftw::Exceptionif the computation of FFT failed

◆ FFT() [2/2]

ComplexUPtr sirius::fftw::FFT ( double *  values,
const Size size 
)

Compute the FFT of real array.

Parameters
valuesinitialized values
sizevalues size
Returns
complex array unique ptr
Exceptions
sirius::fftw::Exceptionif the computation of FFT failed

◆ IFFT()

Image sirius::fftw::IFFT ( const Size image_size,
ComplexUPtr  image_fft 
)

Compute the IFFT of an image FFT.

Parameters
image_sizeimage size
image_fftimage FFT
Returns
image
Exceptions
sirius::fftw::Exceptionif the computation of IFFT failed