File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
include/rapidsmpf/shuffler Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class FinishCounter {
7272 FinishedCallback&& finished_callback = nullptr
7373 );
7474
75- ~FinishCounter ();
75+ ~FinishCounter () = default ;
7676
7777 /* *
7878 * @brief Move the goalpost for a specific rank and partition.
Original file line number Diff line number Diff line change @@ -62,30 +62,26 @@ FinishCounter::FinishCounter(
6262 }
6363}
6464
65- FinishCounter::~FinishCounter () = default ;
66-
6765bool FinishCounter::all_finished () const {
6866 std::unique_lock<std::mutex> lock (mutex_);
6967 // we can not use the goalposts.empty() because its being consumed by wait* methods
70- return n_unfinished_partitions_ == 0 || goalposts_. empty () ;
68+ return n_unfinished_partitions_ == 0 ;
7169}
7270
7371void FinishCounter::move_goalpost (PartID pid, ChunkID nchunks) {
7472 std::unique_lock<std::mutex> lock (mutex_);
75- auto & p_info = goalposts_[ pid] ;
73+ auto & p_info = goalposts_. at ( pid) ;
7674 p_info.move_goalpost (nchunks, nranks_);
7775}
7876
7977void FinishCounter::add_finished_chunk (PartID pid) {
8078 std::unique_lock<std::mutex> lock (mutex_);
81- auto & p_info = goalposts_[ pid] ;
79+ auto & p_info = goalposts_. at ( pid) ;
8280
8381 p_info.add_finished_chunk (nranks_);
8482
8583 if (p_info.is_finished (nranks_)) {
86- RAPIDSMPF_EXPECTS (
87- n_unfinished_partitions_ > 0 , " all partitions have been finished"
88- ); // TODO: use a debug flag
84+ assert (n_unfinished_partitions_ > 0 ); // TODO: use a debug flag
8985 n_unfinished_partitions_--;
9086 lock.unlock ();
9187
You can’t perform that action at this time.
0 commit comments