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

Method TMaster

library/cpp/par/par_master.cpp:223–235  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

221
222 //////////////////////////////////////////////////////////////////////////
223 TMaster::TMaster(TRemoteQueryProcessor* queryProc, TContextDistributor* contextMaster)
224 : QueryProc(queryProc)
225 , ContextMaster(contextMaster)
226 {
227 int hostCount = contextMaster->GetSlaveCount();
228 TVector<int> hostIds;
229 hostIds.resize(hostCount, 0);
230 Anywhere = CreateEnvironment(ENVID_ANYWHERE, hostIds);
231
232 for (int i = 0; i < hostCount; ++i)
233 hostIds[i] = i;
234 Everywhere = CreateEnvironment(ENVID_EVERYWHERE, hostIds);
235 }
236
237 IEnvironment* TMaster::CreateEnvironment(int envId, const TVector<int>& hostIds) {
238 return new TEnvironment(QueryProc.Get(), ContextMaster.Get(), envId, 0, hostIds);

Callers

nothing calls this directly

Calls 2

GetSlaveCountMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected