JayBeams  0.1
Another project to have fun coding.
Static Public Member Functions | List of all members
jb::fftw::traits< double > Struct Template Reference

Wrap the FFTW types and functions for double precision float point numbers. More...

#include <traits.hpp>

Public Types

type traits
typedef double precision_type
 The type used to represent floating point numbers. More...
 
typedef ::std::complex< double > std_complex_type
 The type used to represent complex numbers in the C++ standard library. More...
 
typedef ::fftw_complex fftw_complex_type
 The type used to represent complex numbers in FFTW. More...
 
typedef ::fftw_plan fftw_plan_type
 The type used to represent execution plans in FFTW. More...
 

Static Public Member Functions

static void * allocate (std::size_t n)
 Allocate a properly aligned (for SIMD acceleration) block of memory. More...
 
static void release (void *buffer)
 Release a block of memory allocated with allocate() More...
 
static void execute_plan (fftw_plan_type const p, fftw_complex_type const *in, fftw_complex_type *out)
 Execute an existing plan for a given input and output. More...
 
static void execute_plan (fftw_plan_type const p, precision_type const *in, fftw_complex_type *out)
 Execute an existing plan for a given input and output. More...
 
static void execute_plan (fftw_plan_type const p, fftw_complex_type const *in, precision_type *out)
 Execute an existing plan for a given input and output. More...
 
static fftw_plan_type create_forward_plan (std::size_t size, fftw_complex_type const *in, fftw_complex_type *out, int flags)
 Create an execution plan to compute the DFT based on the input and output exemplars. More...
 
static fftw_plan_type create_backward_plan (std::size_t size, fftw_complex_type const *in, fftw_complex_type *out, int flags)
 Create an execution to compute the inverse DFT based on the input and output exemplars. More...
 
static fftw_plan_type create_plan (std::size_t size, precision_type const *in, fftw_complex_type *out, int flags)
 Create an execution to compute the DFT based on the input and output exemplars. More...
 
static fftw_plan_type create_plan (std::size_t size, fftw_complex_type const *in, precision_type *out, int flags)
 Create an execution to compute the inverse DFT based on the input and output exemplars. More...
 
static fftw_plan_type create_forward_plan_many (int howmany, std::size_t size, fftw_complex_type const *in, fftw_complex_type *out, int flags)
 Create an execution to compute the DFT of many vectors based on the input and output exemplars. More...
 
static fftw_plan_type create_backward_plan_many (int howmany, std::size_t size, fftw_complex_type const *in, fftw_complex_type *out, int flags)
 Create an execution to compute the inverse DFT of many vectors based on the input and output exemplars. More...
 
static fftw_plan_type create_plan_many (int howmany, std::size_t size, precision_type const *in, fftw_complex_type *out, unsigned flags)
 Create an execution to compute the DFT of many vectors based on the input and output exemplars. More...
 
static fftw_plan_type create_plan_many (int howmany, std::size_t size, fftw_complex_type const *in, precision_type *out, int flags)
 Create an execution to compute the inverse DFT of many vectors based on the input and output exemplars. More...
 
static void destroy_plan (fftw_plan_type p)
 Destroy an execution plan. More...
 

Detailed Description

template<>
struct jb::fftw::traits< double >

Wrap the FFTW types and functions for double precision float point numbers.

Definition at line 28 of file traits.hpp.

Member Typedef Documentation

◆ fftw_complex_type

typedef ::fftw_complex jb::fftw::traits< double >::fftw_complex_type

The type used to represent complex numbers in FFTW.

Definition at line 38 of file traits.hpp.

◆ fftw_plan_type

typedef ::fftw_plan jb::fftw::traits< double >::fftw_plan_type

The type used to represent execution plans in FFTW.

Definition at line 40 of file traits.hpp.

◆ precision_type

typedef double jb::fftw::traits< double >::precision_type

The type used to represent floating point numbers.

Definition at line 34 of file traits.hpp.

◆ std_complex_type

typedef ::std::complex<double> jb::fftw::traits< double >::std_complex_type

The type used to represent complex numbers in the C++ standard library.

Definition at line 36 of file traits.hpp.

Member Function Documentation

◆ allocate()

static void* jb::fftw::traits< double >::allocate ( std::size_t  n)
inlinestatic

Allocate a properly aligned (for SIMD acceleration) block of memory.

Parameters
nthe number of bytes to allocate
Returns
a block for at least n bytes

Definition at line 49 of file traits.hpp.

◆ create_backward_plan()

static fftw_plan_type jb::fftw::traits< double >::create_backward_plan ( std::size_t  size,
fftw_complex_type const *  in,
fftw_complex_type out,
int  flags 
)
inlinestatic

Create an execution to compute the inverse DFT based on the input and output exemplars.

Returns
the execution plan
Parameters
sizethe size of the input and output vectors
inthe input vector
outthe output vector
flagscontrol the algorithm choices in FFTW

Definition at line 137 of file traits.hpp.

◆ create_backward_plan_many()

static fftw_plan_type jb::fftw::traits< double >::create_backward_plan_many ( int  howmany,
std::size_t  size,
fftw_complex_type const *  in,
fftw_complex_type out,
int  flags 
)
inlinestatic

Create an execution to compute the inverse DFT of many vectors based on the input and output exemplars.

Returns
the execution plan
Parameters
howmanyhow many timeseries in the arrays
sizethe size of the input and output vectors
inthe input array must be of size howmany*size
outthe output array must be of size howmany*size
flagscontrol the algorithm choices in FFTW

Definition at line 216 of file traits.hpp.

References jb::testing::defaults::size.

◆ create_forward_plan()

static fftw_plan_type jb::fftw::traits< double >::create_forward_plan ( std::size_t  size,
fftw_complex_type const *  in,
fftw_complex_type out,
int  flags 
)
inlinestatic

Create an execution plan to compute the DFT based on the input and output exemplars.

Returns
the execution plan
Parameters
sizethe size of the input and output vectors
inthe input vector
outthe output vector
flagscontrol the algorithm choices in FFTW

Definition at line 120 of file traits.hpp.

◆ create_forward_plan_many()

static fftw_plan_type jb::fftw::traits< double >::create_forward_plan_many ( int  howmany,
std::size_t  size,
fftw_complex_type const *  in,
fftw_complex_type out,
int  flags 
)
inlinestatic

Create an execution to compute the DFT of many vectors based on the input and output exemplars.

Returns
the execution plan
Parameters
howmanyhow many timeseries in the arrays
sizethe size of the input and output vectors
inthe input array must be of size howmany*size
outthe output array must be of size howmany*size
flagscontrol the algorithm choices in FFTW

Definition at line 189 of file traits.hpp.

References jb::testing::defaults::size.

◆ create_plan() [1/2]

static fftw_plan_type jb::fftw::traits< double >::create_plan ( std::size_t  size,
precision_type const *  in,
fftw_complex_type out,
int  flags 
)
inlinestatic

Create an execution to compute the DFT based on the input and output exemplars.

Returns
the execution plan
Parameters
sizethe size of the input and output vectors
inthe input vector
outthe output vector
flagscontrol the algorithm choices in FFTW

Definition at line 154 of file traits.hpp.

◆ create_plan() [2/2]

static fftw_plan_type jb::fftw::traits< double >::create_plan ( std::size_t  size,
fftw_complex_type const *  in,
precision_type out,
int  flags 
)
inlinestatic

Create an execution to compute the inverse DFT based on the input and output exemplars.

Returns
the execution plan
Parameters
sizethe size of the input and output vectors
inthe input vector
outthe output vector
flagscontrol the algorithm choices in FFTW

Definition at line 171 of file traits.hpp.

◆ create_plan_many() [1/2]

static fftw_plan_type jb::fftw::traits< double >::create_plan_many ( int  howmany,
std::size_t  size,
precision_type const *  in,
fftw_complex_type out,
unsigned  flags 
)
inlinestatic

Create an execution to compute the DFT of many vectors based on the input and output exemplars.

Returns
the execution plan
Parameters
howmanyhow many timeseries in the arrays
sizethe size of the input and output vectors
inthe input array must be of size howmany*size
outthe output array must be of size howmany*size
flagscontrol the algorithm choices in FFTW

Definition at line 243 of file traits.hpp.

References jb::testing::defaults::size.

◆ create_plan_many() [2/2]

static fftw_plan_type jb::fftw::traits< double >::create_plan_many ( int  howmany,
std::size_t  size,
fftw_complex_type const *  in,
precision_type out,
int  flags 
)
inlinestatic

Create an execution to compute the inverse DFT of many vectors based on the input and output exemplars.

Returns
the execution plan
Parameters
howmanyhow many timeseries in the arrays
sizethe size of the input and output vectors
inthe input array must be of size howmany*size
outthe output array must be of size howmany*size
flagscontrol the algorithm choices in FFTW

Definition at line 270 of file traits.hpp.

References jb::testing::defaults::size.

◆ destroy_plan()

static void jb::fftw::traits< double >::destroy_plan ( fftw_plan_type  p)
inlinestatic

Destroy an execution plan.

Parameters
pthe plan to destroy

Definition at line 291 of file traits.hpp.

◆ execute_plan() [1/3]

static void jb::fftw::traits< double >::execute_plan ( fftw_plan_type const  p,
fftw_complex_type const *  in,
fftw_complex_type out 
)
inlinestatic

Execute an existing plan for a given input and output.

FFTW requires, but does not check that the input and output have the same alignment and sizes defined in the original plan.

Parameters
pthe execution plan
inthe input vector (or array)
outthe output data (or array)

Definition at line 72 of file traits.hpp.

◆ execute_plan() [2/3]

static void jb::fftw::traits< double >::execute_plan ( fftw_plan_type const  p,
precision_type const *  in,
fftw_complex_type out 
)
inlinestatic

Execute an existing plan for a given input and output.

FFTW requires, but does not check that the input and output have the same alignment and sizes defined in the original plan.

Parameters
pthe execution plan
inthe input vector (or array)
outthe output vector (or array)

Definition at line 88 of file traits.hpp.

◆ execute_plan() [3/3]

static void jb::fftw::traits< double >::execute_plan ( fftw_plan_type const  p,
fftw_complex_type const *  in,
precision_type out 
)
inlinestatic

Execute an existing plan for a given input and output.

FFTW requires, but does not check that the input and output have the same alignment and sizes defined in the original plan.

Parameters
pthe execution plan
inthe input vector (or array)
outthe output vector (or array), can be the same as the input

Definition at line 104 of file traits.hpp.

◆ release()

static void jb::fftw::traits< double >::release ( void *  buffer)
inlinestatic

Release a block of memory allocated with allocate()

Parameters
bufferthe block to release

Definition at line 58 of file traits.hpp.


The documentation for this struct was generated from the following file: