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

Method DoneReduceTask

library/cpp/par/par_exec.h:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 return hasDataCount;
63 }
64 void DoneReduceTask() {
65 if (AtomicAdd(ReduceReqCount, -1) != 0)
66 return;
67 if (AtomicCas(&CurrentState, -1, 0)) {
68 if (!RemapTable.empty()) {
69 int reduceResultCount = RemapTable.ysize();
70 for (int i = 0; i < reduceResultCount; ++i)
71 ResultData[i].swap(ResultData[RemapTable[i]]);
72 ResultData.resize(reduceResultCount);
73 }
74
75 PAR_DEBUG_LOG << "Done reduce tasks" << Endl;
76 CompleteNotify->MRCommandComplete(false, &ResultData);
77 CompleteNotify = nullptr;
78 }
79 }
80 void DistrCmdComplete(int reqId, TVector<char>* res) override {
81 if (res)
82 res->swap(ResultData[reqId]);

Callers

nothing calls this directly

Calls 7

AtomicAddFunction · 0.50
AtomicCasFunction · 0.50
emptyMethod · 0.45
ysizeMethod · 0.45
swapMethod · 0.45
resizeMethod · 0.45
MRCommandCompleteMethod · 0.45

Tested by

no test coverage detected