aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::ThreadExecutorBase Class Reference

Set the max number of threads to be used. More...

#include <agrum/base/core/threads/threadExecutorBase.h>

Inheritance diagram for gum::ThreadExecutorBase:

Static Public Member Functions

static int nbRunningThreadsExecutors ()
 indicates how many threadExecutors are currently running

Static Protected Attributes

static std::atomic< int > nbRunningThreadsExecutors_ {0}
 he number of currently running ThreadExecutors

Detailed Description

Set the max number of threads to be used.

The base class used by all thread executors.

To avoid spare cycles (less then 100% CPU occupied), use more threads than logical processors (x2 is a good all-around value).

Parameters
numberThe number of threads to be used.

Definition at line 62 of file threadExecutorBase.h.

Member Function Documentation

◆ nbRunningThreadsExecutors()

INLINE int gum::ThreadExecutorBase::nbRunningThreadsExecutors ( )
static

indicates how many threadExecutors are currently running

Definition at line 57 of file threadExecutorBase_inl.h.

57 {
59 }
static std::atomic< int > nbRunningThreadsExecutors_
he number of currently running ThreadExecutors

References nbRunningThreadsExecutors_.

Member Data Documentation

◆ nbRunningThreadsExecutors_

std::atomic< int > gum::ThreadExecutorBase::nbRunningThreadsExecutors_ {0}
staticprotected

he number of currently running ThreadExecutors

Definition at line 78 of file threadExecutorBase.h.

Referenced by nbRunningThreadsExecutors().


The documentation for this class was generated from the following files: