Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
DataSequence2DPartialRange.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 
25 #ifndef SKA_CHEETAH_DATA_DATASEQUENCE2DPARTIALRANGE_H
26 #define SKA_CHEETAH_DATA_DATASEQUENCE2DPARTIALRANGE_H
27 
28 #include "cheetah/data/DataSequence2D.h"
29 #include "cheetah/data/DataSequence2DPartialIterator.h"
30 
31 namespace ska {
32 namespace cheetah {
33 namespace data {
34 
35 template <typename Derived>
37 
38 template <typename Derived>
40 {
42  using DataType = typename Traits::DataType;
43  using Iterator = typename Traits::Iterator;
44 
45  public:
47  DataType& data,
48  std::size_t fbegin,
49  std::size_t fend,
50  std::size_t sbegin,
51  std::size_t send,
52  std::size_t flength);
53 
57  Iterator begin() const;
58 
62  Iterator end() const;
63 
64  private:
65  DataType& _data;
66  std::size_t _fbegin, _fend;
67  std::size_t _sbegin, _send;
68  std::size_t _raw_flength;
69 };
70 
71 template <typename Arch, typename Type>
72 class DataSequence2DPartialRange : public DataSequence2DPartialRangeImpl<DataSequence2DPartialRange<Arch,Type>>
73 {
76 
77  public:
78  using DataType = typename Traits::DataType;
79  using Iterator = typename Traits::Iterator;
80  using BaseType::BaseType;
81 };
82 
83 template <typename Arch, typename Type>
84 class DataSequence2DConstPartialRange : public DataSequence2DPartialRangeImpl<DataSequence2DConstPartialRange<Arch,Type>>
85 {
88 
89  public:
90  using DataType = typename Traits::DataType;
91  using Iterator = typename Traits::Iterator;
92  using BaseType::BaseType;
93 };
94 
95 template <typename Arch, typename Type>
97 {
100 };
101 
102 template <typename Arch, typename Type>
104 {
105  using DataType = DataSequence2D<Arch,Type> const;
107 };
108 
109 } // namespace data
110 } // namespace cheetah
111 } // namespace ska
112 
113 #include "cheetah/data/detail/DataSequence2DPartialRange.cpp"
114 
115 #endif
116 
Some limits and constants for FLDO.
Definition: Brdz.h:35
A 2-dimensional sequencial data of type T.
Iterator begin() const
Returns the begin iterator.
Iterator over partial ranges of DataSequence2D types, "fast" axis. Generic type.