Exemple #1
0
 void advanceProgress(size_t size, int depthRemaining)
 {
     boost::unique_lock<MutexType> lock(progressMutex_);
     maxLength_ = std::max(maxLength_, size);
     sumLength_ += size;
     if (size == 0) {
         ++numEmptyLeafs_;
     } else {
         minLength_ = std::min(minLength_, size);
         ++numNonemptyLeafs_;
     }
     if (depthRemaining == 0) {
         ++numFullDepthLeafs_;
     }
     progress_ += static_cast<int>(exp2(depthRemaining));
     progressBar_.draw(progress_);
 }