From 62651cab7374e3a13d2b3c1801b59051739c307f Mon Sep 17 00:00:00 2001 From: Conrad Clevenger Date: Mon, 11 May 2026 16:33:07 -0400 Subject: [PATCH] Use an alias for Kokkos' default view memory trait --- src/kokkos/ekat_kokkos_types.hpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/kokkos/ekat_kokkos_types.hpp b/src/kokkos/ekat_kokkos_types.hpp index 9a69b594..e0d37206 100644 --- a/src/kokkos/ekat_kokkos_types.hpp +++ b/src/kokkos/ekat_kokkos_types.hpp @@ -44,6 +44,9 @@ using DefaultDevice = Kokkos::Device; +// Alias for Kokkos' default memory trait for views (managed memory, no special properties) +using ManagedMemoryTrait = Kokkos::MemoryTraits<0>; + template using ViewLR = Kokkos::View; @@ -66,42 +69,42 @@ struct KokkosTypes template using TeamTagPolicy = Kokkos::TeamPolicy; - template > + template using view = Kokkos::View; // left-layout views, may be useful for interacting with fortran - template > + template using lview = Kokkos::View; // strided-layout views, may be needed in certain subview operations - template > + template using sview = Kokkos::View; // A N-dim view given scalar type and N - template> + template using view_ND = view::type,MemoryTraits>; // More verbose cases for N=1,2,3 - template > + template using view_1d = view; - template > + template using view_2d = view; - template > + template using view_3d = view; - template > + template using view_1d_table = view; - template > + template using view_2d_table = view; // Our workspace implementation makes this a useful type - template > + template > using view_1d_ptr_array = Kokkos::Array >*, N>; - template > + template > using view_1d_ptr_carray = Kokkos::Array >*, N>; };