Add SubView class#1915
Conversation
|
This PR is still a WIP! |
804abcd to
5ba920d
Compare
|
|
||
| } | ||
|
|
||
| // void test_subviewGPU() { |
There was a problem hiding this comment.
To Do: Fix GPU tests.
There was a problem hiding this comment.
Perhaps remove GPU tests?
|
I'm considering separating the SubView holding the view from the slices that are used to access the view, somewhat analogous to the approach of having layouts and Views be separate classes. Any thoughts on this? |
…pen interval [start, end) and added more checks for StridedSlice size
…assert to SubRegion
…ith projected dimensions
2. Replaced camp::array usage with std::array. 3. Fixed and simplified get_dim_stride and get_parent_dim_stride. 4. Replaced usage of IndexType with size_t where appropriate.
| RAJA_INLINE RAJA_HOST_DEVICE constexpr auto operator()(Idxs... idxs) const { | ||
| static_assert(sizeof...(idxs) == n_dims, "Wrong number of indices"); | ||
|
|
||
| std::array<IndexType, n_dims> arr{idxs...}; |
There was a problem hiding this comment.
@MrBurmark Did we decide to go with std::array, or switch back to camp::array here?
There was a problem hiding this comment.
Let's use camp array, we haven't asked users to add the cuda flag that would enable this yet.
There was a problem hiding this comment.
OK, I added back camp::array. This means that we first need to push the following camp PR:
llnl/camp#194
be6df15 to
ea02c47
Compare
Summary
A few simple examples are provided below:
Here,
sv1andsv2are subviews of dimensions(2,3)and(2)respectively.Future tasks: