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

Method AllocatedSizeSlow

tensorflow/core/framework/allocator.h:210–215  ·  view source on GitHub ↗

Returns the allocated size of the buffer at 'ptr' if known, otherwise returns 0. This method can be called when TracksAllocationSizes() is false, but can be extremely slow. REQUIRES: 'ptr!=nullptr' and points to a buffer previously allocated by this allocator.

Source from the content-addressed store, hash-verified

208 // REQUIRES: 'ptr!=nullptr' and points to a buffer previously
209 // allocated by this allocator.
210 virtual size_t AllocatedSizeSlow(const void* ptr) const {
211 if (TracksAllocationSizes()) {
212 return AllocatedSize(ptr);
213 }
214 return 0;
215 }
216
217 // Fills in 'stats' with statistics collected by this allocator.
218 virtual absl::optional<AllocatorStats> GetStats() { return absl::nullopt; }

Callers 3

AllocatedSizeSlowMethod · 0.45
AllocateRawMethod · 0.45
BatchAllocateRawMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected