Skip to content

Commit

Permalink
Add View::rank[_dynamic] static constexpr data members
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Feb 16, 2023
1 parent 2e53f1c commit 314b966
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/Kokkos_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static_assert(false,
#include <View/Hooks/Kokkos_ViewHooks.hpp>

#include <impl/Kokkos_Tools.hpp>
#include <impl/Kokkos_Utilities.hpp> // Impl::integral_constant

#ifdef KOKKOS_ENABLE_IMPL_MDSPAN
#include <View/MDSpan/Kokkos_MDSpan_Extents.hpp>
Expand Down Expand Up @@ -644,6 +645,11 @@ class View : public ViewTraits<DataType, Properties...> {
//----------------------------------------
// Domain rank and extents

static constexpr Impl::integral_constant<size_t, traits::dimension::rank>
rank = {};
static constexpr Impl::integral_constant<size_t,
traits::dimension::rank_dynamic>
rank_dynamic = {};
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
enum {Rank KOKKOS_DEPRECATED_WITH_COMMENT("Use rank instead.") =
map_type::Rank};
Expand Down

0 comments on commit 314b966

Please sign in to comment.