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

Method Add

catboost/libs/helpers/resource_constrained_executor.cpp:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void TResourceConstrainedExecutor::Add(TFunctionWithResourceUsage&& functionWithResourceUsage) {
34 if (functionWithResourceUsage.first > ResourceQuota) {
35 TStringStream message;
36 message << "Resource " << ResourceName
37 << ": functionWithResourceUsage.ResourceUsage(" << functionWithResourceUsage.first
38 << ") > ResourceQuota(" << ResourceQuota << ')';
39 if (LenientMode) {
40 CATBOOST_WARNING_LOG << message.Str() << Endl;
41 } else {
42 ythrow TCatBoostException() << message.Str();
43 }
44 }
45
46 Queue.insert(std::move(functionWithResourceUsage));
47 }
48
49 void TResourceConstrainedExecutor::ExecTasks() {
50 while (!Queue.empty()) {

Callers 12

operator&Method · 0.45
SaveMultiFunction · 0.45
LoadMultiFunction · 0.45
SaveArrayDataFunction · 0.45
LoadArrayDataFunction · 0.45
AddSmartPtrImplFunction · 0.45
AddWithSharedFunction · 0.45
operator&Function · 0.45
operator&Method · 0.45
SimpleTestCaseFunction · 0.45
Y_UNIT_TESTFunction · 0.45
operator&Method · 0.45

Calls 3

moveFunction · 0.50
StrMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected