26 #ifndef FFTSETTINGS_H_ 27 #define FFTSETTINGS_H_ 39 template <
typename T> std::ostream& operator<<( std::ostream&, const FFTSettings<T>& );
48 m_spatial(x,
y,
z,
n),
49 m_freq(x / 2 + 1,
y,
z,
n),
54 size_t padding = (m_freq.
x() * 2) - x;
66 m_freq(spatial.
x() / 2 + 1, spatial.
y(), spatial.
z(), spatial.
n()),
71 size_t padding = (m_freq.
x() * 2) - spatial.
x();
72 m_spatial =
Dimensions(spatial.
x(), spatial.
y(), spatial.
z(), spatial.
n(), padding);
74 assert(
batch <= spatial.
n());
86 constexpr
size_t batch()
const {
91 return m_freq.
xyzPadded() *
sizeof(std::complex<T>);
95 return m_freq.
sizePadded() *
sizeof(std::complex<T>);
99 return m_freq.
xyzPadded() * m_batch *
sizeof(std::complex<T>);
107 return m_spatial.
xyzPadded() *
sizeof(T);
115 return m_spatial.
xyzPadded() * m_batch *
sizeof(T);
136 copy.m_isForward = ! this->m_isForward;
147 auto copy =
FFTSettings<T>(m_spatial.
x(), m_spatial.
y(), m_spatial.
z(), m_batch, m_batch,
153 assert(n <= m_spatial.
n());
160 assert(b <= m_spatial.
n());
166 friend std::ostream &operator<< <T>(std::ostream &os,
constexpr size_t xyzPadded() const
constexpr size_t fBytes() const
FFTSettings< T > createSubset(size_t n) const
constexpr bool isInPlace() const
CUDA_HD constexpr size_t z() const
constexpr size_t fBytesBatch() const
constexpr size_t sBytes() const
constexpr Dimensions fDim() const
constexpr size_t sBytesSingle() const
constexpr size_t fElemsBatch() const
FFTSettings(const Dimensions &spatial, size_t batch=1, bool isInPlace=false, bool isForward=true)
FFTSettings< T > copyForBatch(size_t b) const
constexpr size_t batch() const
CUDA_HD constexpr size_t x() const
FFTSettings(size_t x, size_t y=1, size_t z=1, size_t n=1, size_t batch=1, bool isInPlace=false, bool isForward=true)
CUDA_HD constexpr size_t y() const
FFTSettings< T > createInverse() const
constexpr size_t sizePadded() const
constexpr size_t maxBytesBatch() const
CUDA_HD constexpr size_t n() const
constexpr Dimensions sDim() const
constexpr size_t sElemsBatch() const
FFTSettings< T > createBatch() const
constexpr bool isForward() const
constexpr size_t fBytesSingle() const
constexpr size_t sBytesBatch() const
FFTSettings< T > createSingle() const