Skip to content

Commit

Permalink
[dist] add round trip index mapping test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Dec 16, 2024
1 parent ed1b4da commit a6e1366
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reference/distributed/partition_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ size_type find_local_range(
return local_range_id_hint;
}

auto it = std::lower_bound(
auto it = std::upper_bound(
local_ranges.begin, local_ranges.end, idx,
[range_starting_indices, local_ranges](const auto rid, const auto idx) {
return range_starting_indices[rid] < idx;
[range_starting_indices](const auto value, const auto rid) {
return value < range_starting_indices[rid];
});
auto local_range_id = std::distance(local_ranges.begin, it) - 1;
return local_range_id;
Expand Down

0 comments on commit a6e1366

Please sign in to comment.