Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
HrmsTester.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 
25 #include "cheetah/hrms/test_utils/HrmsTester.h"
26 #include "cheetah/data/PowerSeries.h"
27 #include "cheetah/utils/Architectures.h"
28 
29 #include <vector>
30 
31 namespace ska {
32 namespace cheetah {
33 namespace hrms {
34 namespace test {
35 
36 template<typename ArchitectureTag, typename ArchitectureCapability>
37 HrmsTesterTraits<ArchitectureTag,ArchitectureCapability>::HrmsTesterTraits()
38  : _api(_config)
39 {
40 }
41 
42 template<typename ArchitectureTag, typename ArchitectureCapability>
43 hrms::Hrms& HrmsTesterTraits<ArchitectureTag,ArchitectureCapability>::api()
44 {
45  return _api;
46 }
47 
48 
49 template <typename DeviceType, typename DataType>
51 {
52  inline static void test(DeviceType& device, hrms::Hrms& api)
53  {
54  DataType input(0.001 * data::hz);
55  std::vector<DataType> output(4);
56  input.resize(20);
57  api.process(device,input,output);
58  }
59 };
60 
61 template <typename TestTraits>
64 {
65 }
66 
67 template <typename TestTraits>
69 {
70 }
71 
72 template<typename TestTraits>
74 {
75 
76 }
77 
78 template<typename TestTraits>
80 {
81 }
82 
83 ALGORITHM_TYPED_TEST_P(HrmsTester, test_execution)
84 {
85  TypeParam traits;
88 }
89 
90 // each test defined by ALGORITHM_TYPED_TEST_P must be added to the
91 // test register (each one as an element of the comma seperated list)
92 REGISTER_TYPED_TEST_CASE_P(HrmsTester, test_execution);
93 
94 } // namespace test
95 } // namespace hrms
96 } // namespace cheetah
97 } // namespace ska
Some limits and constants for FLDO.
Definition: Brdz.h:35
A class for performing harmonic summing.
Definition: Hrms.h:45
void process(panda::PoolResource< Arch > &resource, data::PowerSeries< Arch, T, Alloc > const &input, std::vector< data::PowerSeries< Arch, T, Alloc >> &output, Args &&... args)
Perform harmonic summing on a frequency series.
Definition: Hrms.cpp:33