Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Sps.h
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 #ifndef SKA_CHEETAH_SPS_EMULATOR_SPS_H
25 #define SKA_CHEETAH_SPS_EMULATOR_SPS_H
26 
27 #include "cheetah/sps/emulator/Config.h"
28 #include "cheetah/sps/Config.h"
29 #include "cheetah/data/DmTrialsMetadata.h"
30 #include "cheetah/ddtr/DedispersionTrialPlan.h"
31 #include <memory>
32 
33 namespace ska {
34 namespace cheetah {
35 namespace sps {
36 namespace emulator {
37 
43 template<class SpsTraits>
44 class Sps
45 {
46  typedef typename SpsTraits::value_type NumericalRep;
47 
48  public:
49  typedef panda::Cpu Architecture;
50  typedef typename SpsTraits::BufferType BufferType;
51  typedef typename SpsTraits::TimeFrequencyType TimeFrequencyType;
52  typedef typename TimeFrequencyType::TimeType TimeType;
53 
54  private:
55  typedef typename SpsTraits::DmTrialsType DmTrialsType;
56 
57  public:
58  Sps(sps::Config const&);
59  Sps(Sps const&) = delete;
60  Sps(Sps&&);
61  ~Sps();
62 
63  template<typename DmHandler, typename SpHandler>
64  void operator()(panda::PoolResource<cheetah::Cpu>&, BufferType&, DmHandler&, SpHandler&);
65 
66  std::size_t set_dedispersion_strategy(std::size_t memory_limit, TimeFrequencyType const&);
67 
68 
73  static constexpr std::size_t buffer_overlap() { return 0; }
74 
75  private:
76  std::size_t _dedispersion_samples;
77  std::shared_ptr<data::DmTrialsMetadata> _dm_trial_metadata;
78  sps::Config const& _config;
79  std::size_t _max_delay;
80  std::vector<double> _dm_factors;
81 };
82 
83 
84 } // namespace emulator
85 } // namespace sps
86 } // namespace cheetah
87 } // namespace ska
88 
89 #include "detail/Sps.cpp"
90 
91 #endif // SKA_CHEETAH_SPS_EMULATOR_SPS_H
static constexpr std::size_t buffer_overlap()
the number of time samples required to be copied from the end of the previous buffer in to the curren...
Definition: Sps.h:73
all non-templated options for the sps module
Definition: Config.h:52
Produces a stream of random SpCandidate&#39;s.
Definition: Sps.h:44
Some limits and constants for FLDO.
Definition: Brdz.h:35