OoplaceDim#
#include <hpk/fft/factory.hpp>
CLASS
-
struct OoplaceDim : public hpk::fft::Dimension#
Describes the data layout for one dimension of a (possibly multidimensional) out-of-place FFT.
OoplaceDim 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 OoplaceDim()#
Default constructor.
The value of
n
is set to one and both strides are set to zero. This is useful as the batch argument to specify a single transform; it behaves the same asOoplaceDim(1, 0, 0)
.
-
inline OoplaceDim(long n)#
Constructor that sets both strides to zero.
The value for
n
is set as specified, and the strides are 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::OoplaceDim layout[2] = { 3 , 4 } hpk::fft::OoplaceDim layout[2] = {{3, 0, 0}, {4, 0, 0}} hpk::fft::OoplaceDim layout[2] = {{3, 8, 8}, {4, 2, 2}}
-
inline OoplaceDim(long n, long timeStride, long freqStride)#
Constructor.
The values for
n
,timeStride
, andfreqStride
are all set as specified.
Public Members
-
long n#
Number.
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 eithern == 0
orn == 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 settingtimeStride = 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.
-
long freqStride#
Stride in the frequency domain.
For out-of-place transforms,
freqStride
is the stride in the frequency domain. It is measured in terms of real elements. The stride may also be set to zero, in which case the frequency data for the (possibly multidimensional) out-of-place transform is taken to be contiguous in memory (with row-major order). For allforwardCopy
functions,freqStride
is the output stride. For allbackwardCopy
functions,freqStride
is the input stride.
-
inline bool operator==(const OoplaceDim &lhs, const OoplaceDim &rhs)#
Equality requires
n
,timeStride
, andfreqStride
to be equal.
-
inline bool operator!=(const OoplaceDim &lhs, const OoplaceDim &rhs)#
Equality requires
n
,timeStride
, andfreqStride
to be equal.
-
std::string toString(const OoplaceDim &d)#
Returns a string description of an
OoplaceDim
.
-
inline std::ostream &operator<<(std::ostream &os, const OoplaceDim &d)#
Overload for ostream’s
<<
operator for anOoplaceDim
.
-
inline OoplaceDim()#