| 210 | } // namespace |
| 211 | |
| 212 | TensorBufferPool::TensorBufferPool() |
| 213 | : thread_local_cache_size_(GetTensorBufferPoolThreadLocalCacheSize()), |
| 214 | pool_size_(GetTensorBufferPoolSize()) { |
| 215 | auto& thread_local_cache = ThreadLocalCache(); |
| 216 | thread_local_cache.reserve(thread_local_cache_size_); |
| 217 | global_free_list_.reserve(pool_size_); |
| 218 | } |
| 219 | |
| 220 | void TensorBufferPool::Allocate(ItemT* item, const Shape& shape, DataType dtype) { |
| 221 | CHECK(!(*item)) << "TensorBuffer is already allocated"; |
nothing calls this directly
no test coverage detected