MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetBin

Method GetBin

tensorflow/core/common_runtime/tensorpool_allocator.cc:182–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182TensorPoolAllocator::Bin* TensorPoolAllocator::GetBin(
183 size_t bin_index) {
184 if (unlikely(bin_index < 0)) {
185 return nullptr;
186 }
187
188 if (unlikely(bin_index >= large_bin_index_)) {
189 auto it = large_lifetime_bins_.find(bin_index);
190 if (it == large_lifetime_bins_.end()) {
191 return nullptr;
192 } else {
193 return it->second;
194 }
195 }
196 return lifetime_bins_[bin_index];
197}
198
199TensorPoolAllocator::Bin::Bin(size_t len,
200 size_t chunk_size, size_t alignment,

Callers 1

VirtualBufferMethod · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected