Skip to content

Commit

Permalink
Merge pull request #1383 from dalg24/value_initialize_maxloc
Browse files Browse the repository at this point in the history
Value-initialize result of `MaxLoc` reduction to avoid maybe uninitialized warning
  • Loading branch information
ndellingwood authored Apr 13, 2022
2 parents 403a417 + 99f91e4 commit 72c1f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/batched/dense/impl/KokkosBatched_FindAmax_Internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct TeamVectorFindAmaxInternal {
if (m > 0) {
using reducer_value_type =
typename Kokkos::MaxLoc<ValueType, IntType>::value_type;
reducer_value_type value;
reducer_value_type value{};
Kokkos::MaxLoc<ValueType, IntType> reducer_value(value);
Kokkos::parallel_reduce(
Kokkos::TeamVectorRange(member, m),
Expand Down

0 comments on commit 72c1f0c

Please sign in to comment.