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

Method LaunchRange

library/cpp/threading/local_executor/local_executor.cpp:225–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void NPar::TLocalExecutor::TImpl::LaunchRange(TIntrusivePtr<TLocalRangeExecutor> execRange,
226 int queueSizeLimit,
227 std::atomic<int>* queueSize,
228 TLockFreeQueue<TSingleJob>* jobQueue) {
229 int count = Min<int>(ThreadCount + 1, execRange->GetRangeSize());
230 if (queueSizeLimit >= 0 && queueSize->load() >= queueSizeLimit) {
231 return;
232 }
233 queueSize->fetch_add(count);
234 jobQueue->EnqueueAll(TVector<TSingleJob>{size_t(count), TSingleJob(std::move(execRange), 0)});
235 HasJob.Signal();
236}
237
238NPar::TLocalExecutor::TLocalExecutor()
239 : Impl_{MakeHolder<TImpl>()} {

Callers 1

ExecRangeMethod · 0.80

Calls 7

TSingleJobClass · 0.85
GetRangeSizeMethod · 0.80
moveFunction · 0.50
loadMethod · 0.45
fetch_addMethod · 0.45
EnqueueAllMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected