Skip to content

Commit

Permalink
src/batched: Fixes kokkos#1224
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey committed Dec 14, 2021
1 parent cf5efd7 commit e90fb07
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/batched/KokkosBatched_Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,8 @@ KOKKOS_INLINE_FUNCTION auto subview_wrapper(
template <class ViewValueType, class ViewType>
KOKKOS_INLINE_FUNCTION ViewValueType
access_view_bounds_check(ViewType v, int m, int n, const BoundsCheck::Yes &) {
return v(KOKKOSKERNELS_MACRO_MIN(m, v.extent_int(0)),
KOKKOSKERNELS_MACRO_MIN(n, v.extent_int(1)));
//// TODO: use compile-time extents
//// if (m > scr.extent(0) || n > scr.extent(1))
//// return 0;
//// return v(m, n);
return v(KOKKOSKERNELS_MACRO_MIN(m, v.extent_int(0) - 1),
KOKKOSKERNELS_MACRO_MIN(n, v.extent_int(1) - 1));
}

template <class ViewValueType, class ViewType>
Expand Down

0 comments on commit e90fb07

Please sign in to comment.