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

A class for performing harmonic summing. More...

#include <cheetah/hrms/Hrms.h>

Collaboration diagram for ska::cheetah::hrms::Hrms:
Collaboration graph

Public Member Functions

 Hrms (Config const &config)
 Construct a new Hrms object. More...
 
 Hrms (Hrms const &)=delete
 
 Hrms (Hrms &&)=default
 
template<typename Arch , typename T , typename Alloc , typename... Args>
void process (panda::PoolResource< Arch > &resource, data::PowerSeries< Arch, T, Alloc > const &input, std::vector< data::PowerSeries< Arch, T, Alloc >> &output, Args &&... args)
 Perform harmonic summing on a frequency series. More...
 

Detailed Description

A class for performing harmonic summing.

Definition at line 45 of file Hrms.h.

Constructor & Destructor Documentation

◆ Hrms()

ska::cheetah::hrms::Hrms::Hrms ( Config const &  config)

Construct a new Hrms object.

Parameters
configA configuration object for the Hrms instance

Definition at line 30 of file Hrms.cpp.

31  : _config(config)
32  , _implementations(cuda::Hrms(config.cuda_config(),_config))
33 {
34 }

Member Function Documentation

◆ process()

template<typename Arch , typename T , typename Alloc , typename... Args>
void ska::cheetah::hrms::Hrms::process ( panda::PoolResource< Arch > &  resource,
data::PowerSeries< Arch, T, Alloc > const &  input,
std::vector< data::PowerSeries< Arch, T, Alloc >> &  output,
Args &&...  args 
)

Perform harmonic summing on a frequency series.

This is a forwarding call that will pass its arguments onto the first implementation that provides a matching method. The implementation must ensure that the correct size and metadata is set on each of the output FrequencySeries before performing the sum.

Parameters
[in]resourceA panda::PoolResource instance specifying the resource to process on
[in]inputThe FrequencySeries instance on which harmonic summing will be performed
[out]outputA FrequencySeries instance for each harmonic sum that is performed
argsAdditional arguments to be passed to the implementation
Template Parameters
ArchThe cheetah architecture type
TThe value type of the input and output FrequencySeries
AllocThe allocator type of the input and output FrequencySeries
ArgsThe types of additional arguments to be forwarded

Definition at line 33 of file Hrms.cpp.

37 {
38  auto& algo = _implementations.get<Arch>();
39  algo.template process<T,Alloc,Args...>(resource,input,output,std::forward<Args>(args)...);
40 }
void process(panda::PoolResource< Arch > &resource, data::PowerSeries< Arch, T, Alloc > const &input, std::vector< data::PowerSeries< Arch, T, Alloc >> &output, Args &&... args)
Perform harmonic summing on a frequency series.
Definition: Hrms.cpp:33

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