Opm::ThreadManager Class Reference

Simplifies multi-threaded capabilities. More...

#include <threadmanager.hpp>

Public Types

enum  { isFake = false }
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters of the thread manager. More...
 
static void init (bool queryCommandLineParameter=true)
 Initialize number of threads used thread manager. More...
 
static unsigned maxThreads ()
 Return the maximum number of threads of the current process. More...
 
static unsigned threadId ()
 Return the index of the current OpenMP thread. More...
 

Detailed Description

Simplifies multi-threaded capabilities.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
isFake 

Specify whether OpenMP is really available or not.

Member Function Documentation

◆ init()

static void Opm::ThreadManager::init ( bool  queryCommandLineParameter = true)
static

Initialize number of threads used thread manager.

Parameters
queryCommandLineParameterif set to true we will query ThreadsPerProcess and if set (disregard the environment variable OPM_NUM_THREADS). If false we will assume that the number of OpenMP threads is already set outside of this function (e.g. by OPM_NUM_THREADS or in the simulator by the ThreadsPerProcess parameter).

◆ maxThreads()

static unsigned Opm::ThreadManager::maxThreads ( )
inlinestatic

Return the maximum number of threads of the current process.

Referenced by Opm::FvBaseProblem< TypeTag >::finalize(), and Opm::FvBaseDiscretization< TypeTag >::finishInit().

◆ registerParameters()

static void Opm::ThreadManager::registerParameters ( )
static

Register all run-time parameters of the thread manager.

◆ threadId()


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