| 102 | } |
| 103 | |
| 104 | void Predictor::Predict() { |
| 105 | DXCHECK(remaining_files_.empty()); |
| 106 | remaining_files_ = files_; |
| 107 | std::vector<std::thread> threads; |
| 108 | for (int j = 0; j < FLAGS_thread_num; ++j) { |
| 109 | threads.emplace_back(&Predictor::PredictEntry, this, j); |
| 110 | } |
| 111 | for (auto& thread : threads) { |
| 112 | thread.join(); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void Predictor::PredictEntry(int thread_id) { |
| 117 | for (;;) { |