Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
CommonDedispersionPlan.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2021 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 #ifndef SKA_CHEETAH_DDTR_COMMONDEDISPERSIONPLAN_H
25 #define SKA_CHEETAH_DDTR_COMMONDEDISPERSIONPLAN_H
26 
27 #include "cheetah/ddtr/cpu/DedispersionPlan.h"
28 #include "cheetah/ddtr/cpu/Ddtr.h"
29 #include "cheetah/ddtr/Config.h"
30 #include "cheetah/data/Units.h"
31 #include "panda/ConfigurableTask.h"
32 #include "panda/Method.h"
33 #include <tuple>
34 
35 
36 namespace ska {
37 namespace cheetah {
38 namespace ddtr {
39 
40 template<typename AlgoT>
41 struct PlanType {
42  typedef typename AlgoT::DedispersionPlan type;
43 };
44 
45 
46 
47 template<typename TraitsT, typename... AlgosT>
49 {
50  typedef typename TraitsT::TimeFrequencyType TimeFrequencyType;
51  typedef std::tuple<typename AlgosT::Architecture ...> Architectures;
52  typedef typename TraitsT::Config ConfigType;
53 
54  public:
55  CommonDedispersionPlan(ConfigType const& config);
56  virtual ~CommonDedispersionPlan();
57 
58  data::DimensionSize<data::Time> buffer_overlap() const;
59  data::DimensionSize<data::Time> dedispersion_strategy(TimeFrequencyType const&);
60 
64  template<typename AlgoT>
65  typename PlanType<AlgoT>::type const& plan() const;
66 
67  protected:
68  virtual void set_plans() = 0;
69 
70  private:
71  std::tuple<typename PlanType<AlgosT>::type...> _plans;
72 };
73 
74 } // namespace ddtr
75 } // namespace cheetah
76 } // namespace ska
77 #include "cheetah/ddtr/detail/CommonDedispersionPlan.cpp"
78 #endif // SKA_CHEETAH_DDTR_COMMONDEDISPERSIONPLAN_H
Some limits and constants for FLDO.
Definition: Brdz.h:35