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

Method GetContextData

library/cpp/par/par_mr.cpp:30–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 return AllJobs->EnvId2Version;
29 }
30 const IObjectBase* GetContextData(int envId, int hostId) override {
31 TContextHash::const_iterator z = ContextData.find(envId);
32 if (z == ContextData.end()) {
33 Y_ASSERT(0 && "not available envId");
34 return nullptr;
35 }
36 TContextDataHolder* ctx = z->second.Get();
37 int thisCompId = QueryProc->GetCompId();
38 int thisHostId = ctx->Computer2HostId[thisCompId];
39 if (thisHostId != hostId) {
40 Y_ASSERT(0 && "data with this hostId is not available on this computer");
41 return nullptr;
42 }
43 return ctx->Data;
44 }
45 bool HasHostIds(const THashMap<int, bool>& hostIdSet) override {
46 if (ContextData.empty() || hostIdSet.empty())
47 return true;

Callers 2

TCtxPtrMethod · 0.45
GetContextDataMethod · 0.45

Calls 4

GetCompIdMethod · 0.80
findMethod · 0.45
endMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected