Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Member Functions | Protected Member Functions | List of all members
ska::cheetah::fldo::cuda::Config Class Reference
Inheritance diagram for ska::cheetah::fldo::cuda::Config:
Inheritance graph
Collaboration diagram for ska::cheetah::fldo::cuda::Config:
Collaboration graph

Public Member Functions

bool const & enable_split () const
 
size_t const & phases () const
 return the number of phase bins
 
void phases (size_t n)
 Configure the maximum number of phases used in folding. More...
 
size_t const & nsubints () const
 return the number of sub-integrations used in the sum-up data
 
void nsubints (size_t n)
 Configure the number of subints. More...
 
size_t const & nsubbands () const
 return the number of frequency sub-bands summed up
 
void nsubbands (size_t n)
 Configure the number of subbands. More...
 
int fldo_input_check (const fldo::cuda::Config &)
 verify input config parameter are inside the bounds defined in CommonDefs.h. More...
 

Protected Member Functions

void add_options (OptionsDescriptionEasyInit &add_options) override
 

Detailed Description

Definition at line 41 of file Config.h.

Member Function Documentation

◆ fldo_input_check()

int ska::cheetah::fldo::cuda::Config::fldo_input_check ( const fldo::cuda::Config config)

verify input config parameter are inside the bounds defined in CommonDefs.h.

fldo_input_check(fldo::cuda::Config const& config)

Returns
< 0 if error

FldoInputCheck(fldo::cuda::Config const& config)

Returns
< 0 if error

Definition at line 121 of file Config.cpp.

122 {
123  // We access config variables directly.
124  PANDA_LOG_DEBUG << " fldo_input_check: input config parameters check " ;
125 
126  // nsubints check
127  size_t nsubints = config.nsubints();
128  if ((fldo::max_subints < nsubints) || (fldo::min_subints > nsubints)) {
129  static constexpr const char* err_msg = "fldo_input_check: invalid nsubints ";
130  PANDA_LOG_ERROR << err_msg << " (" << nsubints << ")" ;
131  return -3;
132  } else {
133  PANDA_LOG_DEBUG << "fldo_input_check: nsubints (" << nsubints << ")" ;
134  }
135 
136  // nsubbands check
137  size_t nsubbands = config.nsubbands();
138  if ((fldo::max_bands < nsubbands) || (fldo::min_bands > nsubbands)) {
139  static constexpr const char* err_msg = "fldo_input_check: invalid nsubbands ";
140  PANDA_LOG_ERROR << err_msg << " (" << nsubbands << ")" ;
141  //throw panda::Error(err_msg);
142  return -4;
143  } else {
144  PANDA_LOG_DEBUG << "fldo_input_check: nsubbands (" << nsubbands << ")" ;
145  }
146 
147  // phases check
148  // We duplicate inside _nbins
149  size_t phases = config.phases();
150  //_nbins = phases; // nbins is an alias for phases
151  if ((fldo::max_phases < phases) || (fldo::min_phases > phases)) {
152  static constexpr const char* err_msg = "fldo_input_check: invalid phases ";
153  PANDA_LOG_ERROR << err_msg << " (" << phases << ")" ;
154  //throw panda::Error(err_msg);
155  return -5;
156  } else {
157  PANDA_LOG_DEBUG << "fldo_input_check: phases (" << phases << ")" ;
158  }
159 
160  return 0;
161 
162 }
size_t const & nsubints() const
return the number of sub-integrations used in the sum-up data
Definition: Config.cpp:59
size_t const & nsubbands() const
return the number of frequency sub-bands summed up
Definition: Config.cpp:64
size_t const & phases() const
return the number of phase bins
Definition: Config.cpp:54
Here is the call graph for this function:

◆ nsubbands()

void ska::cheetah::fldo::cuda::Config::nsubbands ( size_t  n)

Configure the number of subbands.

void nsubbands(size_t n)

Parameters
[in]nthe number of subbands

Definition at line 74 of file Config.cpp.

75 {
76  _nsubbands = n;
77 }

◆ nsubints()

void ska::cheetah::fldo::cuda::Config::nsubints ( size_t  n)

Configure the number of subints.

void nsubints(size_t n)

Parameters
[in]nthe number of subints

Definition at line 79 of file Config.cpp.

80 {
81  _nsubints = n;
82 }

◆ phases()

void ska::cheetah::fldo::cuda::Config::phases ( size_t  n)

Configure the maximum number of phases used in folding.

void phases(size_t n)

Parameters
[in]nmaximum number of phases used in folding

Definition at line 69 of file Config.cpp.

70 {
71  _phases = n;
72 }

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