Skip to content

Commit

Permalink
Fixup update Kokkos::rank(View) free function and drop outdated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Feb 16, 2023
1 parent 314b966 commit 10fae1f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions core/src/Kokkos_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,6 @@ class View : public ViewTraits<DataType, Properties...> {
map_type::Rank};
#endif

/** \brief rank() to be implemented
*/
// KOKKOS_INLINE_FUNCTION
// static
// constexpr unsigned rank() { return map_type::rank; }

template <typename iType>
KOKKOS_INLINE_FUNCTION constexpr std::enable_if_t<
std::is_integral<iType>::value, size_t>
Expand Down Expand Up @@ -1699,14 +1693,10 @@ class View : public ViewTraits<DataType, Properties...> {
}
};

/** \brief Temporary free function rank()
* until rank() is implemented
* in the View
*/
template <typename D, class... P>
KOKKOS_INLINE_FUNCTION constexpr unsigned rank(const View<D, P...>& V) {
return V.rank;
} // Temporary until added to view
return V.rank();
}

namespace Impl {

Expand Down

0 comments on commit 10fae1f

Please sign in to comment.