#include <hpk/fft/factory.hpp>


struct InplaceDim : public hpk::fft::Dimension#

Describes the data layout for one dimension of a (possibly multidimensional) in-place FFT.

InplaceDim describes one dimension of an FFT or describes a batch of FFTs. It is a standard-layout class, and it is both trivially-copyable and trivially-destructible.

Public Functions

inline InplaceDim()#

Default constructor.

The value of n is set to one and timeStride is set to zero. This is useful as the batch argument to specify a single transform; it behaves the same as InplaceDim(1, 0).

inline InplaceDim(long n)#

Constructor that sets timeStride to zero.

The value for n is set as specified, and timeStride is set to zero. For example, a 2D complex to complex transform of 3 rows and 4 columns with contiguous row-major data layout can be constructed using any of the following:

hpk::fft::InplaceDim layout[2] = { 3    ,  4    }
hpk::fft::InplaceDim layout[2] = {{3, 0}, {4, 0}}
hpk::fft::InplaceDim layout[2] = {{3, 8}, {4, 2}}

inline InplaceDim(long n, long stride)#


The values for n and timeStride are set as specified.

Public Members

long n#


As a dimension of an FFT, n is the mathematical number of points in the discrete Fourier transform. It is the number of points in the time domain. If the time domain is complex, n is the number of complex points. If the time domain is real, n is the number of real points. As a batch dimension, n is the number of transforms, and in this usage either n == 0 or n == 1 indicates a single transform.

long timeStride#

Stride in the time domain.

The timeStride is the stride in the time domain. It is the stride from one point to the next, always measured in terms of real elements. For example, adjacent complex points would have stride 2, and for a complex time domain every other complex point would be specified by setting timeStride = 4. The stride may also be set to zero, in which case the data for the (possibly multidimensional) transform is taken to be contiguous in memory (with row-major order). For all forward transforms, timeStride is the input stride. For all backward transforms, timeStride is the output stride. For all in-place transforms, since the output overwrites the input, timeStride determines both the input stride and the output stride.

long freqStride#


inline bool operator==(const InplaceDim &lhs, const InplaceDim &rhs)#

Equality requires both n and timeStride to be equal.

inline bool operator!=(const InplaceDim &lhs, const InplaceDim &rhs)#

Equality requires both n and timeStride to be equal.

std::string toString(const InplaceDim &d)#

Returns a string description of an InplaceDim.

inline std::ostream &operator<<(std::ostream &os, const InplaceDim &d)#

Overload for ostream’s << operator for an InplaceDim.