| 13 | |
| 14 | namespace xgboost::data { |
| 15 | void Cache::Commit() { |
| 16 | if (!this->written) { |
| 17 | std::partial_sum(this->offset.begin(), this->offset.end(), this->offset.begin()); |
| 18 | this->written = true; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | void TryDeleteCacheFile(const std::string& file) { |
| 23 | // Don't throw, this is called in a destructor. |