Opm::ThreadManager< TypeTag > Class Template Reference

Simplifies multi-threaded capabilities. More...

#include <threadmanager.hh>

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

template<class TypeTag>
class Opm::ThreadManager< TypeTag >

Simplifies multi-threaded capabilities.

Member Enumeration Documentation

◆ anonymous enum

template<class TypeTag >
anonymous enum
Enumerator
isFake 

Specify whether OpenMP is really available or not.

Member Function Documentation

◆ init()

template<class TypeTag >
static void Opm::ThreadManager< TypeTag >::init ( bool  queryCommandLineParameter = true)
inlinestatic

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).

Referenced by start().

◆ maxThreads()

template<class TypeTag >
static unsigned Opm::ThreadManager< TypeTag >::maxThreads ( )
inlinestatic

Return the maximum number of threads of the current process.

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

◆ registerParameters()

template<class TypeTag >
static void Opm::ThreadManager< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters of the thread manager.

◆ threadId()

template<class TypeTag >
static unsigned Opm::ThreadManager< TypeTag >::threadId ( )
inlinestatic

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