MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / IncreasePoolSizeByBase

Method IncreasePoolSizeByBase

oneflow/core/common/tensor_buffer.cpp:271–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void 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
278void TensorBufferPool::DecreasePoolSizeByBase(size_t base) {
279 std::unique_lock<std::mutex> lck(mtx_);

Callers 3

OFRecordDataReaderMethod · 0.80
COCODataReaderMethod · 0.80

Calls 4

GetTensorBufferPoolSizeFunction · 0.85
capacityMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected