Skip to content

Commit

Permalink
Per review drop immediately invoked lambda trick on the host side
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Mar 9, 2024
1 parent c5e98eb commit 26ca833
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/src/impl/Kokkos_ViewMapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3580,13 +3580,11 @@ KOKKOS_INLINE_FUNCTION void view_verify_operator_bounds(
char err[256] = "";
strcat(err, "Kokkos::View ERROR: out of bounds access");
strcat(err, " label=(\"");
KOKKOS_IF_ON_HOST([&] {
if (tracker.m_tracker.has_record()) {
strncat(err, tracker.m_tracker.template get_label<void>().c_str(), 128);
return;
}
strcat(err, "**UNMANAGED**");
}();)
KOKKOS_IF_ON_HOST(
if (tracker.m_tracker.has_record()) {
strncat(err, tracker.m_tracker.template get_label<void>().c_str(),
128);
} else { strcat(err, "**UNMANAGED**"); })
KOKKOS_IF_ON_DEVICE([&] {
// Check #1: is there a SharedAllocationRecord? (we won't use it, but
// if its not there then there isn't a corresponding
Expand Down

0 comments on commit 26ca833

Please sign in to comment.