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

Method GetVersions

library/cpp/par/par_context.cpp:394–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 }
393
394 void TContextDistributor::GetVersions(int envId, int* hostIdCount, THashMap<int, int>* envId2version) {
395 CHROMIUM_TRACE_FUNCTION();
396 TGuard<TMutex> g(Sync);
397 Y_ASSERT(EnvId2Info.find(envId) != EnvId2Info.end() && "unregistered envId");
398 const TFullCtxInfo& dst = EnvId2Info[envId];
399 *hostIdCount = dst.Data.ysize();
400 Y_ASSERT(dst.Data.ysize() == dst.HostId2Computer.ysize());
401 envId2version->clear();
402 for (int curEnvId = envId; curEnvId;) {
403 const TFullCtxInfo& parent = EnvId2Info[curEnvId];
404 (*envId2version)[curEnvId] = parent.MaxVersion;
405 curEnvId = parent.ParentEnvId;
406 }
407 }
408
409 bool TContextDistributor::GetReadyMask(const THashMap<int, int>& envId2Version,
410 TVector<TVector<int>>* hostId2Computer,

Callers 1

TGlobalUserContextMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
ysizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected