CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private Member Functions | Private Attributes
edm::ThreadsController Class Reference

#include <ThreadsController.h>

Public Member Functions

void setStackSize (size_t iStackSize)
 
 ThreadsController ()=delete
 
 ThreadsController (unsigned int iNThreads)
 
 ThreadsController (unsigned int iNThreads, size_t iStackSize)
 

Static Private Member Functions

static std::unique_ptr< tbb::global_control > makeStackSize (size_t iStackSize)
 

Private Attributes

tbb::global_control m_nThreads
 
std::unique_ptr< tbb::global_control > m_stackSize
 

Detailed Description

Definition at line 31 of file ThreadsController.h.

Constructor & Destructor Documentation

◆ ThreadsController() [1/3]

edm::ThreadsController::ThreadsController ( )
delete

◆ ThreadsController() [2/3]

edm::ThreadsController::ThreadsController ( unsigned int  iNThreads)
inlineexplicit

Definition at line 34 of file ThreadsController.h.

35  : m_nThreads{tbb::global_control::max_allowed_parallelism, iNThreads}, m_stackSize{} {}

◆ ThreadsController() [3/3]

edm::ThreadsController::ThreadsController ( unsigned int  iNThreads,
size_t  iStackSize 
)
inline

Definition at line 36 of file ThreadsController.h.

37  : m_nThreads{tbb::global_control::max_allowed_parallelism, iNThreads}, m_stackSize{makeStackSize(iStackSize)} {}

Member Function Documentation

◆ makeStackSize()

std::unique_ptr< tbb::global_control > ThreadsController::makeStackSize ( size_t  iStackSize)
staticprivate

Definition at line 19 of file ThreadsController.cc.

19  {
20  return std::make_unique<tbb::global_control>(tbb::global_control::thread_stack_size, iStackSize);
21  }

Referenced by setStackSize().

◆ setStackSize()

void edm::ThreadsController::setStackSize ( size_t  iStackSize)
inline

Definition at line 40 of file ThreadsController.h.

40 { m_stackSize = makeStackSize(iStackSize); }

References m_stackSize, and makeStackSize().

Member Data Documentation

◆ m_nThreads

tbb::global_control edm::ThreadsController::m_nThreads
private

Definition at line 46 of file ThreadsController.h.

◆ m_stackSize

std::unique_ptr<tbb::global_control> edm::ThreadsController::m_stackSize
private

Definition at line 47 of file ThreadsController.h.

Referenced by setStackSize().

edm::ThreadsController::makeStackSize
static std::unique_ptr< tbb::global_control > makeStackSize(size_t iStackSize)
Definition: ThreadsController.cc:19
edm::ThreadsController::m_nThreads
tbb::global_control m_nThreads
Definition: ThreadsController.h:46
edm::ThreadsController::m_stackSize
std::unique_ptr< tbb::global_control > m_stackSize
Definition: ThreadsController.h:47