Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Member Functions | List of all members
ska::cheetah::fft::Fft Class Reference

A class for performing FFTs. More...

#include <cheetah/fft/Fft.h>

Collaboration diagram for ska::cheetah::fft::Fft:
Collaboration graph

Public Member Functions

 Fft (fft::Config const &config)
 Construct and Fft instance. More...
 
 Fft (Fft const &)=delete
 
 Fft (Fft &&)=default
 
template<typename Arch , typename InputType , typename OutputType , typename... Args>
void process (panda::PoolResource< Arch > &resource, InputType const &input, OutputType &output, Args &&... args)
 Perform an FFT. More...
 

Detailed Description

A class for performing FFTs.

The Fft class acts as a forwarding class for architecture dependent FFT implementations. Forwarding is determined by the types of the data passed to the process() method. These types also implicitly specify the type of FFT to be performed.

Definition at line 50 of file Fft.h.

Constructor & Destructor Documentation

◆ Fft()

ska::cheetah::fft::Fft::Fft ( fft::Config const &  config)

Construct and Fft instance.

Parameters
[in]configA configuration object for the Fft instance

Definition at line 31 of file Fft.cpp.

32  : _config(config)
33  , _implementations(cuda::Fft(_config)
34  ,altera::Fft(_config)
35  )
36 {
37 }

Member Function Documentation

◆ process()

template<typename Arch , typename InputType , typename OutputType , typename... Args>
void ska::cheetah::fft::Fft::process ( panda::PoolResource< Arch > &  resource,
InputType const &  input,
OutputType &  output,
Args &&...  args 
)

Perform an FFT.

The type of FFT performed is deduced from the types of the inputs such that: Input Output FftType TimeSeries (Real) FrequencySeries R2C FrequencySeries TimeSeries (Real) C2R TimeSeries (Complex) FrequencySeries C2C Forward FrequencySeries TimeSeries (Complex) C2C Inverse

This acts as a forwarding method, forwarding the relevant parameters to implementations that are determined by the resource type and the input and output types.

Parameters
[in]resourceA panda::PoolResource instance specifying the resource to process on
[in]inputA TimeSeries or FrequencySeries instance
[out]outputA TimeSeries or FrequencySeries instance
Template Parameters
ArchThe cheetah architecture type
InputTypeThe type of the input parameter
OutputTypeThe type of the output parameter
ArgsThe types of any additional parameters to be forwarded to the implementation

Forward the FFT request to the relevant method of the first implementation that will accept it. The algorithm is determined via an Architecture : Implementation map which must be specified in the scope of the containing class. This provides compile-time resolution of the call chain.

Definition at line 41 of file Fft.cpp.

45 {
46  auto& algo = _implementations.get<Arch>();
47  algo.process(resource, std::forward<InputType const&>(input), output, std::forward<Args>(args)...);
48 }

The documentation for this class was generated from the following files: