Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Member Functions | List of all members
ska::cheetah::tdas::Tdas< T, Handler > Class Template Reference

Async + Sync mixed interface for Tdas. More...

#include <cheetah/tdas/Tdas.h>

Inheritance diagram for ska::cheetah::tdas::Tdas< T, Handler >:
Inheritance graph
Collaboration diagram for ska::cheetah::tdas::Tdas< T, Handler >:
Collaboration graph

Public Member Functions

 Tdas (ConfigType const &config, Handler &handler)
 Construct a new Tdas instance. More...
 
 Tdas (Tdas const &)=delete
 
 Tdas (Tdas &&)=default
 
void operator() (std::shared_ptr< DmTimeType > const &data)
 Async call to tdas. More...
 
- Public Member Functions inherited from ska::cheetah::tdas::TdasBase< T >
 TdasBase (Config const &config)
 Construct a new TdasBase instance. More...
 
 TdasBase (TdasBase const &)=delete
 
 TdasBase (TdasBase &&)=default
 
template<typename Arch , typename... Args>
std::shared_ptr< data::Cclprocess (panda::PoolResource< Arch > &resource, DmTimeSliceType const &data, Args &&... args)
 Process a DmTimeSlice in search of significant periodic signals over a range of acceleration values. More...
 

Detailed Description

template<typename T, typename Handler = void>
class ska::cheetah::tdas::Tdas< T, Handler >

Async + Sync mixed interface for Tdas.

Template Parameters
TThe value type to use for processing (float or double)
HandlerThe type of the Handler that will be used for async calls

Definition at line 107 of file Tdas.h.

Constructor & Destructor Documentation

◆ Tdas()

template<typename T , typename Handler>
ska::cheetah::tdas::Tdas< T, Handler >::Tdas ( ConfigType const &  config,
Handler &  handler 
)

Construct a new Tdas instance.

Parameters
configThe algorithm configuration

EB: Not clear that this is the correct way to handle this situation. It may be better to extend the Mock class so that it has all the traits expected by the ConfigurableTask internals.

Definition at line 56 of file Tdas.cpp.

57  : TdasBase<T>(config)
58  , _config(config)
59  , _task(_config.pool(), handler)
60 {
61  if(_config.cuda_config().active()) {
67  #ifdef ENABLE_CUDA
68  PANDA_LOG << "tdas::cuda algorithm activated";
69  _task.template set_algorithms<cuda::Tdas<T>>(cuda::Tdas<T>(_config.cuda_config(),_config));
70  #else
71  throw panda::Error("tdas::cuda algorithm requested on ENABLE_CUDA=False build");
72  #endif //ENABLE_CUDA
73  }
74  else
75  {
76  PANDA_LOG_WARN << "No Time Domain Accelerated Search algorithm has been specified";
77  }
78 }

Member Function Documentation

◆ operator()()

template<typename T , typename Handler >
void ska::cheetah::tdas::Tdas< T, Handler >::operator() ( std::shared_ptr< DmTimeType > const &  data)

Async call to tdas.

Parameters
dataA DmTime to be processed

Definition at line 86 of file Tdas.cpp.

87 {
88  PANDA_LOG_DEBUG << "Tdas::operator() invoked"
89  << "Num blocks in DmTime object: " << (data->blocks()).size();
90 
91  for (auto it = data->begin(_config.dm_trials_per_task()); it < data->end(); ++it)
92  {
93  std::shared_ptr<DmTimeSliceType> slice = *it;
94  PANDA_LOG_DEBUG << "First DM in slice: " << (*(slice->cbegin())).dm();
95  _task.submit(slice);
96  PANDA_LOG_DEBUG << "Tdas::operator() " << _config.dm_trials_per_task() << " DM trials submitted for processing";
97  }
98 }

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