Skip to content

Commit

Permalink
src/batched: Revert to returning 0 for general use-case
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey committed Dec 14, 2021
1 parent e90fb07 commit 82b2728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/batched/KokkosBatched_Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,10 @@ 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) - 1),
KOKKOSKERNELS_MACRO_MIN(n, v.extent_int(1) - 1));
if (m < v.extent_int(0) && n < v.extent_int(1))
return v(m, n);
else
return (ViewValueType)0.0F;
}

template <class ViewValueType, class ViewType>
Expand Down

0 comments on commit 82b2728

Please sign in to comment.