10 #include <rapidsmpf/communicator/communicator.hpp>
11 #include <rapidsmpf/shuffler/chunk.hpp>
86 [[nodiscard]] std::string
str()
const;
93 Rank n_ranks_with_goalpost_{0};
95 ChunkID total_finished_chunks_{0};
96 std::vector<bool> rank_reported_;
98 mutable std::mutex mutex_;
Helper to tally the finish status of a shuffle.
void move_goalpost(Rank src_rank, ChunkID nchunks)
Move the goalpost for a specific source rank.
std::string str() const
Returns a description of this instance.
void add_finished_chunk()
Add a finished chunk to the global counter.
bool all_finished() const
Returns whether all partitions are finished (non-blocking).
FinishCounter(Rank nranks, PartID n_local_partitions)
Construct a finish counter.
std::uint64_t ChunkID
The globally unique ID of a chunk.
std::uint32_t PartID
Partition ID, which goes from 0 to the total number of partitions.
std::ostream & operator<<(std::ostream &os, detail::FinishCounter const &obj)
Overloads the stream insertion operator for the FinishCounter class.
std::int32_t Rank
The rank of a node (e.g. the rank of a MPI process), or world size (total number of ranks).