Skip to content

Commit

Permalink
Add compatible copy assignment operator to DualView
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenarnst committed Oct 1, 2023
1 parent 41cf2e5 commit 82044c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions containers/src/Kokkos_DualView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ class DualView : public ViewTraits<DataType, Properties...> {
d_view(src.d_view),
h_view(src.h_view) {}

//! Copy assignment operator (shallow copy assignment)
template <typename DT, typename... DP>
DualView& operator=(const DualView<DT, DP...>& src) {
modified_flags = src.modified_flags;
d_view = src.d_view;
h_view = src.h_view;
return *this;
}

//! Subview constructor
template <class DT, class... DP, class Arg0, class... Args>
DualView(const DualView<DT, DP...>& src, const Arg0& arg0, Args... args)
Expand Down

0 comments on commit 82044c6

Please sign in to comment.