From 542d7ae5f381af47dc1d0de705d818f33a7b2e34 Mon Sep 17 00:00:00 2001 From: Christian Trott Date: Wed, 2 Oct 2024 13:26:50 -0600 Subject: [PATCH] Renamed and test CheckedRelaxedAtomicAccessor --- core/src/View/MDSpan/Kokkos_MDSpan_Accessor.hpp | 2 +- core/unit_test/view/TestBasicView.hpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/View/MDSpan/Kokkos_MDSpan_Accessor.hpp b/core/src/View/MDSpan/Kokkos_MDSpan_Accessor.hpp index 1712eaf3ee1..929569ee180 100644 --- a/core/src/View/MDSpan/Kokkos_MDSpan_Accessor.hpp +++ b/core/src/View/MDSpan/Kokkos_MDSpan_Accessor.hpp @@ -396,7 +396,7 @@ using CheckedReferenceCountedAccessor = template -using checked_atomic_accessor_relaxed = +using CheckedRelaxedAtomicAccessor = SpaceAwareAccessor>; template ; using view_type = Kokkos::BasicView; + using um_accessor_type = Kokkos::Impl::CheckedRelaxedAtomicAccessor< + T, typename ExecutionSpace::memory_space>; + using um_view_type = + Kokkos::BasicView; extents_type extents{}; auto view = view_type("test_view", extents); + um_view_type um_view(view); EXPECT_TRUE(view.data_handle().has_record()); EXPECT_NE(view.data_handle().get(), nullptr); @@ -243,6 +248,8 @@ void test_atomic_accessor() { make_spanning_mdrange_policy_from_extents(extents); Kokkos::parallel_for(mdrange_policy, MDRangeTestFunctor{view}); + Kokkos::parallel_for(mdrange_policy, + MDRangeTestFunctor{um_view}); } TEST(TEST_CATEGORY, basic_view_atomic_accessor) {