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

Method FindMemoryRegion

tensorflow/contrib/verbs/rdma.cc:1411–1419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1409//*****************************************************************************
1410
1411ibv_mr* RdmaMemoryMgr::FindMemoryRegion(void* addr, size_t length) {
1412 mutex_lock l(mrs_mu_);
1413 auto iter = std::upper_bound(mrs_.begin(), mrs_.end(), addr, &Comparator);
1414 if (iter == std::end(mrs_) || iter->get()->addr > addr) {
1415 return nullptr;
1416 } else {
1417 return iter->get();
1418 }
1419}
1420
1421void RdmaMemoryMgr::InsertMemoryRegion(void* addr, size_t length,
1422 const std::string& allocator_name) {

Callers 3

RecvHandlerMethod · 0.45
SendContentMethod · 0.45
AllocateTensorsMethod · 0.45

Calls 4

upper_boundFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected