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

Function ProjectJob

library/cpp/par/par_jobreq.cpp:74–107  ·  view source on GitHub ↗

get commands executed on subTask computers dstPlace - places in original results vector to copy results of res remoteHasData - whether result is not empty (can be empty due to reduce ops) partId - vector of partIds for original cmd array

Source from the content-addressed store, hash-verified

72 // remoteHasData - whether result is not empty (can be empty due to reduce ops)
73 // partId - vector of partIds for original cmd array
74 void ProjectJob(TJobDescription* res, int thisPartId,
75 TVector<int>* dstPlace, TVector<bool>* remoteHasData,
76 TVector<int>* partId,
77 const TJobDescription& allJob,
78 const TVector<ui16>& subTask) {
79 CHROMIUM_TRACE_FUNCTION();
80 TVector<bool> selectedComps;
81 GetSelectedCompList(&selectedComps, subTask);
82
83 res->ExecList.resize(0);
84 res->ExecList.reserve(allJob.ExecList.ysize());
85 dstPlace->resize(0);
86
87 TRemapper<TVector<char>> cmdRemap(&res->Cmds, allJob.Cmds);
88 TParamsRemapper paramsRemap(&res->ParamsData, &res->ParamsPtr, allJob.ParamsData, allJob.ParamsPtr);
89 int prevReduceId = -1;
90 for (int i = 0; i < allJob.ExecList.ysize(); ++i) {
91 TJobParams params = allJob.ExecList[i];
92 if (params.CompId >= selectedComps.ysize() || selectedComps[params.CompId] == false)
93 continue;
94
95 bool hasData = params.ReduceId != prevReduceId;
96 (*remoteHasData)[i] = hasData;
97 if (hasData)
98 dstPlace->push_back(i);
99
100 params.CmdId = cmdRemap.GetNewId(params.CmdId);
101 params.ParamId = paramsRemap.GetNewId(params.ParamId);
102 res->ExecList.push_back(params);
103 (*partId)[i] = thisPartId;
104 prevReduceId = params.ReduceId;
105 }
106 Y_ASSERT(!res->ExecList.empty());
107 }
108
109 // get jobs subset by job index
110 void ProjectJob(TJobDescription* res,

Callers 3

LaunchOpsMethod · 0.85
LaunchBlockRequestMethod · 0.85
RemoteMapReduceImplFunction · 0.85

Calls 7

GetSelectedCompListFunction · 0.85
resizeMethod · 0.45
reserveMethod · 0.45
ysizeMethod · 0.45
push_backMethod · 0.45
GetNewIdMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected