| 269 | } |
| 270 | |
| 271 | void TensorBufferPool::IncreasePoolSizeByBase(size_t base) { |
| 272 | std::unique_lock<std::mutex> lck(mtx_); |
| 273 | pool_size_ += GetTensorBufferPoolSize(base); |
| 274 | if (pool_size_ > global_free_list_.capacity()) { global_free_list_.reserve(pool_size_); } |
| 275 | if (pool_size_ < global_free_list_.size()) { global_free_list_.resize(pool_size_); } |
| 276 | } |
| 277 | |
| 278 | void TensorBufferPool::DecreasePoolSizeByBase(size_t base) { |
| 279 | std::unique_lock<std::mutex> lck(mtx_); |
no test coverage detected