FTransform Namespace Reference

Defines a single interface to a variety of Fourier transform libraries. More...

Classes

class  Agent
 Base class of one-dimensional FFT agents. More...
 
class  Bench
 Stores Fourier transform benchmark data. More...
 
class  NotImplemented
 Base class for libraries that do not implement two-dimensional FFT. More...
 
class  Plan
 Abstract base class of one-dimensional Fast Fourier Transforms. More...
 
class  Plan2
 Abstract base class of two-dimensional Fast Fourier Transforms. More...
 
class  PlanAgent
 Template virtual base class of FFT library agents. More...
 

Enumerations

enum  normalization { normalized, unnormalized }
 The normalization convention.
 
enum  direction { forward = 0x10, backward = 0x20 }
 The FFT direction.
 
enum  dimension { real = 0x01, analytic = 0x02 }
 The FFT dimension.
 
enum  type { frc = forward | real, bcr = backward | real, fcc = forward | analytic, bcc = backward | analytic }
 The FFT type. More...
 

Functions

void frc1d (size_t nfft, float *into, const float *from)
 Forward real-to-complex FFT. More...
 
void bcr1d (size_t nfft, float *into, const float *from)
 Backward complex-to-real FFT. More...
 
void fcc1d (size_t nfft, float *into, const float *from)
 Forward complex-to-complex FFT.
 
void bcc1d (size_t nfft, float *into, const float *from)
 Backward complex-to-complex FFT.
 
std::string get_library ()
 Returns the name of the currently selected library. More...
 
void set_library (const std::string &name)
 Set the library to the specified name. More...
 
unsigned get_num_libraries ()
 Get the number of available libraries.
 
std::string get_library_name (unsigned i)
 Get the name of the ith available library.
 
void clean_plans ()
 Clears out the memory associated with the plans.
 
normalization get_norm ()
 Returns the normalization convention of the currently selected library. More...
 
double get_scale (size_t nfft, type t)
 Returns the scale factor associated with the FFT operation.
 
void shift (unsigned npts, float *arr, double shift)
 Use the Fourier transform to cyclically shift the elements in array.
 
void derivative (unsigned npts, float *data)
 Use the Fourier transform to compute the derivative of data.
 
int inplace_frc1d (size_t nfft, float *srcdest)
 Inplace wrapper-function- performs a memcpy after FFTing.
 
int inplace_fcc1d (size_t nfft, float *srcdest)
 Inplace wrapper-function- performs a memcpy after FFTing.
 
int inplace_bcc1d (size_t nfft, float *srcdest)
 Inplace wrapper-function- performs a memcpy after FFTing.
 
int inplace_bcr1d (size_t nfft, float *srcdest)
 Inplace wrapper-function- performs a memcpy after FFTing.
 
void fcc2d (size_t nx, size_t ny, float *into, const float *from)
 Forward complex-to-complex FFT.
 
void bcc2d (size_t nx, size_t ny, float *into, const float *from)
 Backward complex-to-complex FFT.
 
template<typename Method >
void test_libraries (Method runtest, const char *test_name)
 

Variables

bool optimize = false
 Whether to optimize or not.
 
bool simd = false
 Whether to use SIMD or not.
 
unsigned nthread = 1
 Number of threads that will use the plan.
 

Detailed Description

Defines a single interface to a variety of Fourier transform libraries.

Enumeration Type Documentation

◆ type

The FFT type.

Enumerator
frc 

forward real to complex

bcr 

backward complex to real

fcc 

forward complex to complex

bcc 

backward complex to complex

Function Documentation

◆ bcr1d()

void FTransform::bcr1d ( size_t  nfft,
float *  into,
const float *  from 
)

Backward complex-to-real FFT.

both 'into' and 'from' must point to an array of nfft+2 floats

References bcr.

Referenced by inplace_bcr1d().

◆ frc1d()

void FTransform::frc1d ( size_t  nfft,
float *  into,
const float *  from 
)

Forward real-to-complex FFT.

'into' must point to an array of nfft+2 floats

References frc.

Referenced by inplace_frc1d().

◆ get_library()

string FTransform::get_library ( )

Returns the name of the currently selected library.

Returns currently selected library.

Referenced by get_scale().

◆ get_norm()

FTransform::normalization FTransform::get_norm ( )

Returns the normalization convention of the currently selected library.

Returns currently selected normalization.

Referenced by derivative(), get_scale(), and shift().

◆ set_library()

void FTransform::set_library ( const std::string &  name)

Set the library to the specified name.

Choose to use a different library.

References FTransform::Agent::set_library().


Generated using doxygen 1.8.17