SOFA API  b5aefb45
Open source framework for multi-physics simuation
sofa::core::ExecParams Class Reference

#include <ExecParams.h>

Class gathering parameters use by most components methods, and transmitted by all visitors. More...

Inheritance diagram for sofa::core::ExecParams:

Detailed Description

Class gathering parameters use by most components methods, and transmitted by all visitors.

Public Member Functions

bool checkValidStorage () const
 
ExecMode execMode () const
 Mode of execution requested. More...
 
int threadID () const
 Index of current thread (0 corresponding to the only thread in sequential mode, or first thread in parallel mode) More...
 
int nbThreads () const
 Number of threads currently known to Sofa. More...
 
 ExecParams ()
 
void update ()
 Make sure this instance is up-to-date relative to the current thread. More...
 
ExecParamssetExecMode (ExecMode v)
 Request a specific mode of execution. More...
 
ExecParamssetThreadID (int v)
 Specify the index of the current thread. More...
 

Static Public Member Functions

static ExecParamsdefaultInstance ()
 Get the default ExecParams, to be used to provide a default values for method parameters. More...
 

Constructor details

◆ ExecParams()

sofa::core::ExecParams::ExecParams ( )
inline

Function details

◆ checkValidStorage()

bool sofa::core::ExecParams::checkValidStorage ( ) const

◆ defaultInstance()

ExecParams * sofa::core::ExecParams::defaultInstance ( )
static

Get the default ExecParams, to be used to provide a default values for method parameters.

◆ execMode()

ExecMode sofa::core::ExecParams::execMode ( ) const
inline

Mode of execution requested.

◆ nbThreads()

int sofa::core::ExecParams::nbThreads ( ) const
inline

Number of threads currently known to Sofa.

◆ setExecMode()

ExecParams& sofa::core::ExecParams::setExecMode ( ExecMode  v)
inline

Request a specific mode of execution.

◆ setThreadID()

ExecParams& sofa::core::ExecParams::setThreadID ( int  v)
inline

Specify the index of the current thread.

◆ threadID()

int sofa::core::ExecParams::threadID ( ) const
inline

Index of current thread (0 corresponding to the only thread in sequential mode, or first thread in parallel mode)

◆ update()

void sofa::core::ExecParams::update ( )

Make sure this instance is up-to-date relative to the current thread.

Enum details

◆ ExecMode

Modes of execution.

Enumerator
EXEC_NONE 
EXEC_DEFAULT 
EXEC_DEBUG 
EXEC_GPU 
EXEC_GRAPH