15#ifndef IPPL_FFT_FFTBASE_H
16#define IPPL_FFT_FFTBASE_H
29template <
unsigned Dim,
class T>
class FFTBase;
30template <
unsigned Dim,
class T>
37 static const char* transformTypeString_g[4] = {
"complex-to-complex FFT",
38 "real-to-complex FFT",
42 return std::string(transformTypeString_g[i % 4]);
53template <
unsigned Dim,
class T>
102 void write(std::ostream& out)
const;
195template <
unsigned Dim,
class T>
207template <
unsigned Dim,
class T>
210 const char* directionName) {
223template <
unsigned Dim,
class T>
236template <
unsigned Dim,
class T>
250template <
unsigned Dim,
class T>
267template <
unsigned Dim,
class T>
273 static bool matched[
Dim];
277 for (d=0; d<
Dim; ++d) matched[d] =
false;
282 while (!found && d1<
Dim) {
286 found = ( dom1[d].length()==dom2[d1].length() &&
287 dom1[d].sameBase(dom2[d1]) );
289 if (found) matched[d1] =
true;
293 if (!found)
return false;
std::ostream & operator<<(std::ostream &, const FFTBase< Dim, T > &)
Define operator<< to invoke write() member function:
std::string getTransformType(unsigned int i)
character strings for transform types
FFTPACK< T > InternalFFT_t
int getDirection(const char *directionName) const
translate direction name string into dimension number
Precision_t & getNormFact(void)
get the FFT normalization factor
const Domain_t & getDomain(void) const
get our domain
InternalFFT_t FFTEngine_m
void setNormFact(Precision_t nf)
unsigned numTransformDims(void) const
query number of transform dimensions
void write(std::ostream &out) const
unsigned nTransformDims_m
bool transformDims_m[Dim]
FFTBase(FFT_e transform, const Domain_t &domain, const bool transformTheseDims[Dim], bool compressTemps)
std::map< const char *, int > directions_m
bool compressTempFields_m
static GuardCellSizes< Dim > nullGC
bool transformDim(unsigned d) const
query whether this dimension is to be transformed
void setDirectionName(int direction, const char *directionName)
bool compressTemps(void) const
unsigned activeDimension(unsigned d) const
get dimension number from list of transformed dimensions
InternalFFT_t & getEngine(void)
access the internal FFT Engine
FFTBase(FFT_e transform, const Domain_t &domain, bool compressTemps)
bool checkDomain(const Domain_t &dom1, const Domain_t &dom2) const
compare indexes of two domains