-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporating skycleaver functionality to skyweaver #20
base: pipeline_dev
Are you sure you want to change the base?
Changes from 19 commits
81bad82
efeffb7
63c854b
0201f7e
331c1cf
5dc0bf4
ccc6ebb
a823587
e14fc64
4f72d08
36b1271
b36cb9f
4826368
4aec59b
2462dad
c55bf3c
819ee96
63b85f8
510fc01
4ae82ab
2787d00
6a33108
bbd9fd1
456719a
48adc14
0cfe1f9
ee35ae2
52b1ab3
4bf4df1
70647a9
0dde728
5ca8add
8fbb204
0595fa9
00fa137
e697b31
a1a2c94
cbaf03b
820efb9
49c966a
ff71497
45964ca
8610cab
112a857
13047bb
4f15b64
fbb980b
03b92c5
4242cf9
6675ae6
ab6b13e
0d8e6aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,23 @@ struct DescribedVector { | |
_vector.resize(calculate_nelements()); | ||
} | ||
|
||
/** | ||
* @brief Construct a new Described Vector object of specific size | ||
* | ||
* @param sizes The sizes of the dimensions (must match the number of | ||
* dimensions) | ||
*/ | ||
DescribedVector(std::initializer_list<std::size_t> sizes, value_type default_value) | ||
: _dms_stale(true), _frequencies_stale(true), _sizes(sizes), | ||
_dims{dims...}, _tsamp(0.0) | ||
{ | ||
if(_sizes.size() != sizeof...(dims)) { | ||
throw std::invalid_argument( | ||
"Number of sizes must match number of dimensions"); | ||
} | ||
_vector.resize(calculate_nelements(), default_value); | ||
} | ||
|
||
/** | ||
* @brief Destroy the Described Vector object | ||
* | ||
|
@@ -213,6 +230,12 @@ struct DescribedVector { | |
*/ | ||
auto const& operator[](std::size_t idx) const { return _vector[idx]; } | ||
|
||
|
||
// also the at() method | ||
auto& at(std::size_t idx) { return _vector[idx]; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What purpose does this serve? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is another function in std::vector that I tried to mimic here. Not required but good to have. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After discussion, we decided to keep this in. |
||
auto const& at(std::size_t idx) const { return _vector[idx]; } | ||
|
||
|
||
/** | ||
* @brief Resize the dimensions of the vector | ||
* | ||
|
@@ -648,7 +671,7 @@ using BTFPowersH = DescribedVector<thrust::host_vector<T, PinnedAllocator<T>>, | |
template <typename T> | ||
using BTFPowersD = | ||
DescribedVector<thrust::device_vector<T>, BeamDim, TimeDim, FreqDim>; | ||
// Incoherent dedisperser outputs | ||
// Incoherent dedisperser outputs, also used for skycleaver | ||
template <typename T> | ||
using TDBPowersH = DescribedVector<thrust::host_vector<T, PinnedAllocator<T>>, | ||
TimeDim, | ||
|
@@ -667,6 +690,13 @@ template <typename T> | |
using FPAStatsD = | ||
DescribedVector<thrust::device_vector<T>, FreqDim, PolnDim, AntennaDim>; | ||
|
||
//skycleaver output vectors | ||
|
||
template <typename T> | ||
using TFPowersH = DescribedVector<thrust::host_vector<T, PinnedAllocator<T>>, | ||
TimeDim, | ||
FreqDim>; | ||
|
||
} // namespace skyweaver | ||
|
||
#endif // SKYWEAVER_DESCRIBEDVECTORS_HPP |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++ standard should be set in compiler_settings.cmake with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed this and added
set (CMAKE_CXX_STANDARD 20)