fftplan.hh
#ifndef __SDR_FFTPLAN_HH__
#define __SDR_FFTPLAN_HH__
#include "buffer.hh"
#include "node.hh"
#include "config.hh"
namespace sdr {
// Forward declaration of FFTPlan
template <class Scalar> class FFTPlan { };
class FFT {
public:
typedef enum {
FORWARD, BACKWARD
} Direction;
template <class Scalar>
static void exec(const Buffer< std::complex<Scalar> > &in,
const Buffer< std::complex<Scalar> > &out, FFT::Direction dir)
{
FFTPlan<Scalar> plan(in, out, dir); plan();
}
template <class Scalar>
static void exec(const Buffer< std::complex<Scalar> > &inplace, FFT::Direction dir)
{
FFTPlan<Scalar> plan(inplace, dir); plan();
}
};
}
#ifdef SDR_WITH_FFTW
#include "fftplan_fftw3.hh"
#endif
#endif // __SDR_FFTPLAN_HH__
sdr::FFT::Direction
Direction
Direction type.
Definition: fftplan.hh:17
sdr
Definition: autocast.hh:8
sdr::FFTPlan
Trivial FFT implementation for buffer sizes of N=2**K.
Definition: fftplan.hh:11
sdr::FFT::exec
static void exec(const Buffer< std::complex< Scalar > > &in, const Buffer< std::complex< Scalar > > &out, FFT::Direction dir)
Performs a FFT transform.
Definition: fftplan.hh:23
sdr::FFT::exec
static void exec(const Buffer< std::complex< Scalar > > &inplace, FFT::Direction dir)
Performs an in-place FFT transform.
Definition: fftplan.hh:31
sdr::FFT
FFT module class, provides static methods to perfrom a FFT directly.
Definition: fftplan.hh:14
sdr::Buffer
A typed buffer.
Definition: buffer.hh:111