Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Config.cpp
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #include "cheetah/tdas/cuda/Config.h"
25 
26 
27 namespace ska {
28 namespace cheetah {
29 namespace tdas {
30 namespace cuda {
31 
32 Config::Config()
33  : utils::Config("cuda")
34 #ifdef ENABLE_CUDA
35  , _active(true)
36 #else
37  , _active(false)
38 #endif
39 {
40  add(_dred_config);
41  add(_brdz_config);
42  add(_tdrt_config);
43  add(_tdao_config);
44  add(_pwft_config);
45  add(_hrms_config);
46  add(_fft_config);
47 }
48 
49 Config::~Config()
50 {
51 }
52 
53 tdrt::Config const& Config::tdrt_config() const
54 {
55  return _tdrt_config;
56 }
57 
58 tdrt::Config& Config::tdrt_config()
59 {
60  return _tdrt_config;
61 }
62 
63 tdao::Config const& Config::tdao_config() const
64 {
65  return _tdao_config;
66 }
67 
68 tdao::Config& Config::tdao_config()
69 {
70  return _tdao_config;
71 }
72 
73 pwft::Config const& Config::pwft_config() const
74 {
75  return _pwft_config;
76 }
77 
78 pwft::Config& Config::pwft_config()
79 {
80  return _pwft_config;
81 }
82 
83 hrms::Config const& Config::hrms_config() const
84 {
85  return _hrms_config;
86 }
87 
88 hrms::Config& Config::hrms_config()
89 {
90  return _hrms_config;
91 }
92 
93 fft::Config const& Config::fft_config() const
94 {
95  return _fft_config;
96 }
97 
98 fft::Config& Config::fft_config()
99 {
100  return _fft_config;
101 }
102 
103 brdz::Config const& Config::brdz_config() const
104 {
105  return _brdz_config;
106 }
107 
108 brdz::Config& Config::brdz_config()
109 {
110  return _brdz_config;
111 }
112 
113 dred::Config const& Config::dred_config() const
114 {
115  return _dred_config;
116 }
117 
118 dred::Config& Config::dred_config()
119 {
120  return _dred_config;
121 }
122 
123 void Config::add_options(OptionsDescriptionEasyInit& add_options)
124 {
125  add_options
126  ("active", boost::program_options::value<bool>(&_active), "use the cuda based algorithm for time domain search");
127 }
128 
129 bool Config::active() const
130 {
131  return _active;
132 }
133 
134 } // namespace cuda
135 } // namespace tdas
136 } // namespace cheetah
137 } // namespace ska
Configuration for the BRDZ module.
Definition: Config.h:43
Configuration for the fft module.
Definition: Config.h:42
configuration for the tdrt module
Definition: Config.h:41
Some limits and constants for FLDO.
Definition: Brdz.h:35
Algorithm configuration for the Dred module.
Definition: Config.h:47
Algorithm configuration object for Hrms.
Definition: Config.h:40