ExecParams
The `ExecParams` class in the SOFA framework is designed to gather parameters used by most components' methods and transmitted by all visitors. It manages execution modes, thread IDs, and ensures correct storage validity across threads. **Role and Purpose:** - Provides a standardized way of passing runtime parameters such as execution mode (`EXEC_DEFAULT`, `EXEC_DEBUG`, etc.) and thread information to SOFA components during simulation execution. - Ensures the integrity of parameter storage by checking for valid thread-specific storage. **Interactions with Other Components:* - Interfaces with other components through methods that retrieve or set execution parameters, ensuring consistent behavior across different threads and modes of operation. - Typically used by visitors to carry runtime information from one component to another in the scene graph traversal process. **Practical Usage Guidance:** - Utilize `defaultInstance()` to get a default instance with initial thread settings. - Use methods like `setExecMode`, `execMode`, `threadID` for setting and retrieving execution parameters. - Ensure thread-specific parameter validity by calling `checkValidStorage` in debug mode. **Data Fields:** - No public data fields; internal storage is managed through the private `storage` member, which holds execution modes (`execMode`) and thread IDs (`threadID`).
- abstract
- `ExecParams` manages runtime execution parameters including modes and thread information for SOFA components during simulation execution.
- sheet
- # ExecParams **Overview:** `ExecParams` is a class in the SOFA framework that gathers and transmits parameters used by most components' methods. It ensures consistent behavior across different threads and execution modes. **Parameters and Data:* The `ExecParams` class provides several methods to manage execution parameters: - `execMode()`: Returns the current mode of execution requested. - `threadID()`: Returns the index of the current thread. - `nbThreads()`: Returns the number of threads in use. - `setExecMode(ExecMode v)`: Sets a specific mode of execution for the current instance. - `setThreadID(int v)`: Specifies the index of the current thread. **Practical Notes:** Ensure thread-specific parameter validity by calling `checkValidStorage` in debug mode. Use `defaultInstance()` to get a default instance with initial settings.
- description
- The `ExecParams` class in the SOFA framework is designed to gather parameters used by most components' methods and transmitted by all visitors. It manages execution modes, thread IDs, and ensures correct storage validity across threads. **Role and Purpose:** - Provides a standardized way of passing runtime parameters such as execution mode (`EXEC_DEFAULT`, `EXEC_DEBUG`, etc.) and thread information to SOFA components during simulation execution. - Ensures the integrity of parameter storage by checking for valid thread-specific storage. **Interactions with Other Components:* - Interfaces with other components through methods that retrieve or set execution parameters, ensuring consistent behavior across different threads and modes of operation. - Typically used by visitors to carry runtime information from one component to another in the scene graph traversal process. **Practical Usage Guidance:** - Utilize `defaultInstance()` to get a default instance with initial thread settings. - Use methods like `setExecMode`, `execMode`, `threadID` for setting and retrieving execution parameters. - Ensure thread-specific parameter validity by calling `checkValidStorage` in debug mode. **Data Fields:** - No public data fields; internal storage is managed through the private `storage` member, which holds execution modes (`execMode`) and thread IDs (`threadID`).
- maths
- The `ExecParams` class in the SOFA framework is primarily responsible for managing runtime execution parameters such as the mode of execution (e.g., default, debug) and thread information. It does not directly involve any mathematical or physical computations but serves a crucial role in ensuring consistent behavior across different threads and modes during simulation execution. **Role in Simulation Execution:* - **Execution Modes**: The `ExecParams` class defines several execution modes (e.g., `EXEC_DEFAULT`, `EXEC_DEBUG`) that can be requested by components. These modes are used to control the behavior of components during different stages of a simulation, such as debugging or normal operation. - **Thread Management**: The class manages thread-specific parameters through the `threadID` and `nbThreads`. This ensures that each thread has its own set of execution parameters, which is crucial for maintaining consistency in multi-threaded simulations. **Methods:* - `execMode()`: Returns the current mode of execution requested. This method can be used by components to adjust their behavior based on the execution mode. - `threadID()`: Returns the index of the current thread, which helps identify and manage operations specific to each thread. - `setExecMode(ExecMode v)`: Sets a specific mode of execution for the current instance. This can be used to switch between different modes during runtime. - `setThreadID(int v)`: Specifies the index of the current thread, ensuring that each thread has its own unique identifier and associated parameters. **Storage Validity:* - `checkValidStorage()`: Ensures that the storage for execution parameters is valid and corresponds to the correct thread. This method helps in maintaining the integrity of parameter storage across threads. **Default Instance Management:* - `defaultInstance()`: Provides a default instance of `ExecParams` with initial settings, which can be used as a fallback or default configuration for components during runtime. In summary, while the `ExecParams` class does not involve direct mathematical or physical computations, it plays an essential role in managing and maintaining consistent execution parameters across different threads and modes during simulation operations. This ensures that all components behave as expected under various conditions and configurations.
{
"name": "ExecParams",
"main": {
"name": "ExecParams",
"namespace": "sofa::core",
"module": "Sofa.framework.Core",
"include": "sofa/core/ExecParams.h",
"doc": "Class gathering parameters use by most components methods, and transmitted by all visitors",
"inherits": [],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "checkValidStorage",
"return_type": "bool",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "execMode",
"return_type": "ExecMode",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "threadID",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "nbThreads",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "defaultInstance",
"return_type": "ExecParams *",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": true,
"access": "public"
},
{
"name": "update",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setExecMode",
"return_type": "ExecParams &",
"params": [
{
"name": "v",
"type": "ExecMode"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setThreadID",
"return_type": "ExecParams &",
"params": [
{
"name": "v",
"type": "int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
]
},
"desc": {
"description": "The `ExecParams` class in the SOFA framework is designed to gather parameters used by most components' methods and transmitted by all visitors. It manages execution modes, thread IDs, and ensures correct storage validity across threads.\n\n**Role and Purpose:**\n- Provides a standardized way of passing runtime parameters such as execution mode (`EXEC_DEFAULT`, `EXEC_DEBUG`, etc.) and thread information to SOFA components during simulation execution.\n- Ensures the integrity of parameter storage by checking for valid thread-specific storage.\n\n**Interactions with Other Components:*\n- Interfaces with other components through methods that retrieve or set execution parameters, ensuring consistent behavior across different threads and modes of operation.\n- Typically used by visitors to carry runtime information from one component to another in the scene graph traversal process.\n\n**Practical Usage Guidance:**\n- Utilize `defaultInstance()` to get a default instance with initial thread settings.\n- Use methods like `setExecMode`, `execMode`, `threadID` for setting and retrieving execution parameters.\n- Ensure thread-specific parameter validity by calling `checkValidStorage` in debug mode.\n\n**Data Fields:**\n- No public data fields; internal storage is managed through the private `storage` member, which holds execution modes (`execMode`) and thread IDs (`threadID`)."
},
"maths": {
"maths": "The `ExecParams` class in the SOFA framework is primarily responsible for managing runtime execution parameters such as the mode of execution (e.g., default, debug) and thread information. It does not directly involve any mathematical or physical computations but serves a crucial role in ensuring consistent behavior across different threads and modes during simulation execution.\n\n**Role in Simulation Execution:*\n- **Execution Modes**: The `ExecParams` class defines several execution modes (e.g., `EXEC_DEFAULT`, `EXEC_DEBUG`) that can be requested by components. These modes are used to control the behavior of components during different stages of a simulation, such as debugging or normal operation.\n\n- **Thread Management**: The class manages thread-specific parameters through the `threadID` and `nbThreads`. This ensures that each thread has its own set of execution parameters, which is crucial for maintaining consistency in multi-threaded simulations.\n\n**Methods:*\n- `execMode()`: Returns the current mode of execution requested. This method can be used by components to adjust their behavior based on the execution mode.\n\n- `threadID()`: Returns the index of the current thread, which helps identify and manage operations specific to each thread.\n\n- `setExecMode(ExecMode v)`: Sets a specific mode of execution for the current instance. This can be used to switch between different modes during runtime.\n\n- `setThreadID(int v)`: Specifies the index of the current thread, ensuring that each thread has its own unique identifier and associated parameters.\n\n**Storage Validity:*\n- `checkValidStorage()`: Ensures that the storage for execution parameters is valid and corresponds to the correct thread. This method helps in maintaining the integrity of parameter storage across threads.\n\n**Default Instance Management:*\n- `defaultInstance()`: Provides a default instance of `ExecParams` with initial settings, which can be used as a fallback or default configuration for components during runtime.\n\nIn summary, while the `ExecParams` class does not involve direct mathematical or physical computations, it plays an essential role in managing and maintaining consistent execution parameters across different threads and modes during simulation operations. This ensures that all components behave as expected under various conditions and configurations."
},
"summary": {
"abstract": "`ExecParams` manages runtime execution parameters including modes and thread information for SOFA components during simulation execution.",
"sheet": "# ExecParams\n\n**Overview:**\n`ExecParams` is a class in the SOFA framework that gathers and transmits parameters used by most components' methods. It ensures consistent behavior across different threads and execution modes.\n\n**Parameters and Data:*\nThe `ExecParams` class provides several methods to manage execution parameters:\n- `execMode()`: Returns the current mode of execution requested.\n- `threadID()`: Returns the index of the current thread.\n- `nbThreads()`: Returns the number of threads in use.\n- `setExecMode(ExecMode v)`: Sets a specific mode of execution for the current instance.\n- `setThreadID(int v)`: Specifies the index of the current thread.\n\n**Practical Notes:**\nEnsure thread-specific parameter validity by calling `checkValidStorage` in debug mode. Use `defaultInstance()` to get a default instance with initial settings."
}
}