Skip to content

Commit

Permalink
Use call operator instead of run_me function
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenarnst committed Oct 4, 2023
1 parent 94c5d9a commit d8f8142
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions containers/unit_tests/TestDualView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ struct test_dualview_copy_construction_and_assignment {
using scalar_type = Scalar;
using execution_space = Device;

void run_me() {
void operator()() {
constexpr unsigned int n = 10;
constexpr unsigned int m = 5;

using SrcViewType = Kokkos::DualView<Scalar**, Kokkos::LayoutLeft, Device>;
using DstViewType =
Kokkos::DualView<const Scalar * [m], Kokkos::LayoutLeft, Device>;

SrcViewType a("A", n, m);

// Copy construction
Expand All @@ -99,8 +99,6 @@ struct test_dualview_copy_construction_and_assignment {
a.clear_sync_state();
}
}

test_dualview_copy_construction_and_assignment() { run_me(); }
};

template <typename Scalar, class Device>
Expand Down Expand Up @@ -424,7 +422,7 @@ void test_dualview_alloc(unsigned int size) {

template <typename Scalar, typename Device>
void test_dualview_copy_construction_and_assignment() {
Impl::test_dualview_copy_construction_and_assignment<Scalar, Device>();
Impl::test_dualview_copy_construction_and_assignment<Scalar, Device>()();
}

template <typename Scalar, typename Device>
Expand Down

0 comments on commit d8f8142

Please sign in to comment.