15 #ifndef FftwReal2dDftData_H 16 #define FftwReal2dDftData_H 44 template<std::
size_t N>
47 Index ndim = nsams.size();
48 for (
Index idim=0; idim<ndim; ++idim ) {
49 Index nsam = nsams[idim];
50 Index fac = idim == ndim - 1 ? nsam/2 + 1 : nsam;
58 template<std::
size_t N>
95 if ( idim >
rank() )
return 0;
111 Index ifrq0 = ifrqs[0];
112 Index ifrq1 = ifrqs[1];
115 Index n1 = nfrq1/2 + 1;
116 if ( ifrq0 >= nfrq0 ) {
119 if ( ifrq1 >= nfrq1 ) {
123 if ( ifrq0 > 0 ) ifrq0 = nfrq0 - ifrq0;
124 ifrq1 = nfrq1 - ifrq1;
126 return n1*ifrq0 + ifrq1;
136 Index n1 = nfrq1/2 + 1;
137 Index ifrq0 = idat/n1;
138 if ( ifrq0 >= nfrq0 )
return arrs;
139 Index ifrq1 = idat%n1;
141 Index jfrq0 = ifrq0 > 0 ? nfrq0 - ifrq0 : 0;
142 if ( ifrq1 == 0 )
return arrs;
143 Index jfrq1 = nfrq1 - ifrq1;
144 if ( jfrq1 == ifrq1 )
return arrs;
std::array< Index, 2 > IndexArray
const Complex * data() const
Index nSamples(Index idim) const
int copyIn(const IndexArray nsams, const ComplexVector &data)
IndexArrayVector indexArrays(Index idat) const
int moveOut(ComplexVector &data)
Norm normalization() const override
static Index dftComplexDataSize(const std::array< Index, N > &nsams)
Index globalIndex(const IndexArray &ifrqs) const
void reset(const IndexArray &nsams) override
int moveIn(const IndexArray nsams, ComplexVector &data)
Complex value(const IndexArray &isams) const override
FftwReal2dDftData(Norm norm, const IndexArray &nsams)
auto norm(Vector const &v)
Return norm of the specified vector.
std::complex< Float > Complex
std::vector< Complex > ComplexVector
static Index dftFloatDataSize(const std::array< Index, N > &nsams)
int copyOut(ComplexVector &data) const
Index size(Index idim) const
const IndexArray & nSamples() const override
Complex value(Index idat) const
std::vector< IndexArray > IndexArrayVector
const Float * floatData() const