Skip to content

Commit

Permalink
Fix GCC build for sorting example.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklas-uhl committed Jan 29, 2024
1 parent 049c507 commit 68265f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/applications/sample-sort/mpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ void sort(MPI_Comm comm, std::vector<T>& data, size_t seed) {
pick_splitters(static_cast<size_t>(size) - 1, oversampling_ratio, global_samples);
auto buckets = build_buckets(data, global_samples);
std::vector<int> sCounts, sDispls, rCounts(static_cast<size_t>(size)), rDispls(static_cast<size_t>(size));
int send_pos = 0;
size_t send_pos = 0;
for (auto& bucket: buckets) {
data.insert(data.end(), bucket.begin(), bucket.end());
sCounts.push_back(static_cast<int>(bucket.size()));
sDispls.push_back(send_pos);
sDispls.push_back(static_cast<int>(send_pos));
send_pos += bucket.size();
}
MPI_Alltoall(sCounts.data(), 1, MPI_INT, rCounts.data(), 1, MPI_INT, comm);
Expand Down

0 comments on commit 68265f8

Please sign in to comment.