aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::threadsSTL Namespace Reference

Classes

struct  ThreadExecutor

Functions

unsigned int getNumberOfThreads ()
 returns the max number of threads used by default when entering the next parallel region
void setNumberOfThreads (unsigned int number)
 Set the max number of threads to be used when entering the next parallel region.
unsigned int getMaxNumberOfThreads ()
 Returns the maximum number of threads you should use at any time.
unsigned int getNumberOfLogicalProcessors ()
 Get the number of logical processors.

Variables

static unsigned int _nb_threads_ {getMaxNumberOfThreads()}

Function Documentation

◆ getNumberOfThreads()

unsigned int gum::threadsSTL::getNumberOfThreads ( )

returns the max number of threads used by default when entering the next parallel region

This is the number of threads launched in parallel regions. By default, this number is equal to getMaxNumberOfThreads() but if the user has changed it using method setNumberOfThreads, then this number is what the user required.

Returns
the number of threads used by default the next time we enter into a parallel region

Definition at line 68 of file threadsSTL.cpp.

68{ return _nb_threads_; }
static unsigned int _nb_threads_

References _nb_threads_.

Variable Documentation

◆ _nb_threads_

unsigned int gum::threadsSTL::_nb_threads_ {getMaxNumberOfThreads()}
static

Definition at line 64 of file threadsSTL.cpp.

unsigned int getMaxNumberOfThreads()
Returns the maximum number of threads you should use at any time.

Referenced by getNumberOfThreads(), and setNumberOfThreads().