Skip to content

Commit

Permalink
Fix merge_path_search (#592)
Browse files Browse the repository at this point in the history
Co-authored-by: jsandham <james.sandham@amd.com>
  • Loading branch information
jsandham and jsandham authored Aug 16, 2024
1 parent e5103be commit 0c307ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rocprim/include/rocprim/thread/thread_search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ ROCPRIM_HOST_DEVICE inline void merge_path_search(OffsetT diagonal,
BinaryFunction compare_function
= BinaryFunction())
{
path_coordinate.x = rocprim::detail::merge_path(a, b, a_len, b_len, diagonal, compare_function);
path_coordinate.y = diagonal - path_coordinate.x;
OffsetT split_min = rocprim::detail::merge_path(a, b, a_len, b_len, diagonal, compare_function);
path_coordinate.x = ::rocprim::min(split_min, a_len);
path_coordinate.y = diagonal - split_min;
}

/// \brief Returns the offset of the first value within \p input which does not compare less than \p val
Expand Down

0 comments on commit 0c307ac

Please sign in to comment.