SOFA API  caf3b296
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...
 
int aspectID () const
 
ExecParamssetAspectID (int)
 Specify the aspect 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...
 
static int currentAspect ()
 
static int currentAspect (const core::ExecParams *)
 

Constructor details

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

Function details

int sofa::core::ExecParams::aspectID ( ) const
inline
bool sofa::core::ExecParams::checkValidStorage ( ) const
static int sofa::core::ExecParams::currentAspect ( )
inlinestatic
static int sofa::core::ExecParams::currentAspect ( const core::ExecParams )
inlinestatic
ExecParams * sofa::core::ExecParams::defaultInstance ( )
static

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

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

Mode of execution requested.

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

Number of threads currently known to Sofa.

ExecParams& sofa::core::ExecParams::setAspectID ( int  )
inline

Specify the aspect index of the current thread.

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

Request a specific mode of execution.

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

Specify the index of the current thread.

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)

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

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

Enum details

Modes of execution.

Enumerator
EXEC_NONE 
EXEC_DEFAULT 
EXEC_DEBUG 
EXEC_GPU 
EXEC_GRAPH