InplaceDim#
#include <hpk/fft/factory.hpp>
CLASS
- 
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
nis set to one andtimeStrideis set to zero. This is useful as the batch argument to specify a single transform; it behaves the same asInplaceDim(1, 0).
- 
inline InplaceDim(long n)#
 Constructor that sets
timeStrideto zero.The value for
nis set as specified, andtimeStrideis 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)#
 Constructor.
The values for
nandtimeStrideare set as specified.
Public Members
- 
long n#
 Number.
As a dimension of an FFT,
nis 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,nis the number of complex points. If the time domain is real,nis the number of real points. As a batch dimension,nis the number of transforms, and in this usage eithern == 0orn == 1indicates a single transform.
- 
long timeStride#
 Stride in the time domain.
The
timeStrideis 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,timeStrideis the input stride. For all backward transforms,timeStrideis the output stride. For all in-place transforms, since the output overwrites the input,timeStridedetermines both the input stride and the output stride.
- 
long freqStride#
 Unused.
- 
inline bool operator==(const InplaceDim &lhs, const InplaceDim &rhs)#
 Equality requires both
nandtimeStrideto be equal.
- 
inline bool operator!=(const InplaceDim &lhs, const InplaceDim &rhs)#
 Equality requires both
nandtimeStrideto 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 anInplaceDim.
- 
inline InplaceDim()#