File indexing completed on 2024-04-06 12:11:56
0001
0002
0003
0004
0005
0006
0007 #include "oneapi/tbb/task_arena.h"
0008 #include "FWCore/Concurrency/interface/setNThreads.h"
0009
0010 namespace edm {
0011 unsigned int setNThreads(unsigned int iNThreads, unsigned int iStackSize, std::unique_ptr<ThreadsController>& oPtr) {
0012
0013 iStackSize *= 1024;
0014
0015 oPtr.reset();
0016 if (0 == iNThreads) {
0017
0018 iNThreads = oneapi::tbb::this_task_arena::max_concurrency();
0019 }
0020 oPtr = std::make_unique<ThreadsController>(static_cast<int>(iNThreads), iStackSize);
0021
0022 return iNThreads;
0023 }
0024 }