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

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

#include <traits.hpp>

Public Types

type traits
typedef long 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 ::fftwl_complex fftw_complex_type
 The type used to represent complex numbers in FFTW. More...
 
typedef ::fftwl_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< long double >

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

Definition at line 572 of file traits.hpp.

Member Typedef Documentation

◆ fftw_complex_type

typedef ::fftwl_complex jb::fftw::traits< long double >::fftw_complex_type

The type used to represent complex numbers in FFTW.

Definition at line 582 of file traits.hpp.

◆ fftw_plan_type

typedef ::fftwl_plan jb::fftw::traits< long double >::fftw_plan_type

The type used to represent execution plans in FFTW.

Definition at line 584 of file traits.hpp.

◆ precision_type

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

The type used to represent floating point numbers.

Definition at line 578 of file traits.hpp.

◆ std_complex_type

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

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

Definition at line 580 of file traits.hpp.

Member Function Documentation

◆ allocate()

static void* jb::fftw::traits< long 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 594 of file traits.hpp.

◆ create_backward_plan()

static fftw_plan_type jb::fftw::traits< long 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 682 of file traits.hpp.

◆ create_backward_plan_many()

static fftw_plan_type jb::fftw::traits< long 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 761 of file traits.hpp.

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

◆ create_forward_plan()

static fftw_plan_type jb::fftw::traits< long 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 665 of file traits.hpp.

◆ create_forward_plan_many()

static fftw_plan_type jb::fftw::traits< long 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 734 of file traits.hpp.

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

◆ create_plan() [1/2]

static fftw_plan_type jb::fftw::traits< long 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 699 of file traits.hpp.

◆ create_plan() [2/2]

static fftw_plan_type jb::fftw::traits< long 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 716 of file traits.hpp.

◆ create_plan_many() [1/2]

static fftw_plan_type jb::fftw::traits< long 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 788 of file traits.hpp.

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

◆ create_plan_many() [2/2]

static fftw_plan_type jb::fftw::traits< long 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 815 of file traits.hpp.

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

◆ destroy_plan()

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

Destroy an execution plan.

Parameters
pthe plan to destroy

Definition at line 836 of file traits.hpp.

◆ execute_plan() [1/3]

static void jb::fftw::traits< long 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 617 of file traits.hpp.

◆ execute_plan() [2/3]

static void jb::fftw::traits< long 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 633 of file traits.hpp.

◆ execute_plan() [3/3]

static void jb::fftw::traits< long 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 649 of file traits.hpp.

◆ release()

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

Release a block of memory allocated with allocate()

Parameters
bufferthe block to release

Definition at line 603 of file traits.hpp.


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