MCPcopy Create free account
hub / github.com/catboost/catboost / TAllDataSync

Method TAllDataSync

library/cpp/netliba/v6/ib_collective.cpp:477–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475
476 public:
477 TAllDataSync(size_t bufSize, TPtrArg<TIBMemPool> memPool, TPtrArg<IReduceOp> reduceOp)
478 : CurrentBuffer(0)
479 , DataSize(0)
480 , BufSize(bufSize)
481 , CurrentOffset(0)
482 , ReadyOffset(0)
483 , WasFlushed(false)
484 , ActiveRDMACount(0)
485 , FutureRecvMask(0)
486 , ReduceOp(reduceOp)
487 {
488 if (memPool) {
489 MemBlock[0] = memPool->Alloc(BufSize);
490 MemBlock[1] = memPool->Alloc(BufSize);
491 CQ = new TComplectionQueue(memPool->GetIBContext(), WR_COUNT);
492 SRQ = new TSharedReceiveQueue(memPool->GetIBContext(), WR_COUNT);
493 FakeRecvMem = memPool->Alloc(4096);
494 } else {
495 MemBlock[0] = new TIBMemBlock(BufSize);
496 MemBlock[1] = new TIBMemBlock(BufSize);
497 CQ = new TComplectionQueue(nullptr, WR_COUNT);
498 SRQ = new TSharedReceiveQueue(nullptr, WR_COUNT);
499 FakeRecvMem = new TIBMemBlock(4096);
500 }
501 for (int i = 0; i < WR_COUNT; ++i) {
502 PostRecv();
503 }
504 }
505 ~TAllDataSync() {
506 while (ActiveRDMACount > 0) {
507 ibv_wc wc;

Callers

nothing calls this directly

Calls 2

AllocMethod · 0.45
GetIBContextMethod · 0.45

Tested by

no test coverage detected