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

Method GetBin

tensorflow/core/framework/ev_allocator.h:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 Bin<ChunkType>* GetBin(const void* ptr) const {
90 const auto k =
91 reinterpret_cast<std::uintptr_t>(ptr) >> page_shift_;
92 const auto i1 = k >> kLeafBits;
93 const auto i2 = k & (kLeafLength - 1);
94 if ((k >> bits_) > 0 || root_[i1] == nullptr) {
95 return nullptr;
96 }
97 return root_[i1]->bin[i2];
98 }
99
100 void SetBin(const void* ptr, Bin<ChunkType>* b) {
101 const auto start =

Callers 2

FlushBackToArenaMethod · 0.45
AllocatedSizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected