From 82b2728ddaecdefed1d352180fd2de6d608c4ce7 Mon Sep 17 00:00:00 2001 From: Evan Harvey Date: Tue, 14 Dec 2021 16:21:38 -0700 Subject: [PATCH] src/batched: Revert to returning 0 for general use-case --- src/batched/KokkosBatched_Util.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/batched/KokkosBatched_Util.hpp b/src/batched/KokkosBatched_Util.hpp index 4ef2d2e478..4b873c406a 100644 --- a/src/batched/KokkosBatched_Util.hpp +++ b/src/batched/KokkosBatched_Util.hpp @@ -825,8 +825,10 @@ KOKKOS_INLINE_FUNCTION auto subview_wrapper( template 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