Skip to content

Commit

Permalink
Improve function name check_bounds -> within_range
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Mar 9, 2024
1 parent e4a444d commit 0c55381
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/impl/Kokkos_ViewMapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3538,7 +3538,7 @@ namespace Kokkos {
namespace Impl {

template <class Map, class... Indices, std::size_t... Enumerate>
KOKKOS_FUNCTION bool check_bounds(Map const& map,
KOKKOS_FUNCTION bool within_range(Map const& map,
std::index_sequence<Enumerate...>,
Indices... indices) {
return (... && ((std::size_t)indices < map.extent(Enumerate)));
Expand Down Expand Up @@ -3575,7 +3575,7 @@ template <class MemorySpace, class ViewType, class MapType, class... Args>
KOKKOS_INLINE_FUNCTION void view_verify_operator_bounds(
Kokkos::Impl::ViewTracker<ViewType> const& tracker, const MapType& map,
Args... args) {
if (!check_bounds(map, std::make_index_sequence<sizeof...(Args)>(),
if (!within_range(map, std::make_index_sequence<sizeof...(Args)>(),
args...)) {
char err[256] = "";
strcat(err, "Kokkos::View ERROR: out of bounds access");
Expand Down

0 comments on commit 0c55381

Please sign in to comment.