TaskSchedulerUser
`TaskSchedulerUser` manages task schedulers in SOFA by initializing, reinitializing, and stopping them based on specified thread counts. It controls parallel execution to ensure efficient task scheduling.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation
- include
- sofa/simulation/task/TaskSchedulerUser.h
- description
The TaskSchedulerUser component in the SOFA framework is not directly involved in the mathematical or physical aspects of finite element simulations. Instead, it focuses on managing and controlling task schedulers for parallel execution. This component does not contribute to any specific governing equations, constitutive laws, kinematic laws, or numerical methods used within the FEM simulation pipeline. Its primary role is to initialize, reinitialize, and stop a task scheduler based on user-specified parameters such as the number of threads (d_nbThreads) and the type of task scheduler (d_taskSchedulerType). This ensures efficient parallel execution of tasks in the SOFA framework. Therefore, there are no mathematical or physical equations directly associated with this component.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_nbThreads |
int | |
-n (minus) corresponds to the number of available cores on the CPU minus the provided number. |
Methods
void
initTaskScheduler
()
void
reinitTaskScheduler
()
void
stopTaskSchduler
()
{
"name": "TaskSchedulerUser",
"namespace": "sofa::simulation",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/task/TaskSchedulerUser.h",
"doc": "",
"inherits": [],
"templates": [],
"data_fields": [
{
"name": "d_nbThreads",
"type": "int",
"xmlname": "nbThreads",
"help": "-n (minus) corresponds to the number of available cores on the CPU minus the provided number."
}
],
"links": [],
"methods": [
{
"name": "initTaskScheduler",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "reinitTaskScheduler",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "stopTaskSchduler",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
],
"description": "<p>The `TaskSchedulerUser` component in the SOFA framework is responsible for managing and controlling task schedulers, which are used to execute tasks across multiple threads or processes. It inherits from the base class in the core object model.</p>\n\n<ul>\n<li><strong>Role:</strong> The primary role of `TaskSchedulerUser` is to initialize, reinitialize, and stop a task scheduler based on the specified number of threads and task scheduler type. This component helps manage parallel execution by setting up the appropriate thread count for tasks to run efficiently.</li>\n\n<li><strong>Data Fields:</strong></li>\n</ul>\n\n<ul>\n<li>`d_nbThreads`: An integer field specifying the number of threads for the task scheduler. The value can be adjusted dynamically, and a negative value indicates that the specified number should be subtracted from the total available CPU cores.</li>\n</ul>\n\n<ul>\n<li><strong>Interactions with Other Components:</strong></li>\n</ul>\n\n<p>`TaskSchedulerUser` interacts with task scheduler objects through protected methods like `initTaskScheduler`, `reinitTaskScheduler`, and `stopTaskSchduler`. These methods are used to configure the task scheduler according to specified parameters, such as the type of scheduler (stored in `d_taskSchedulerType`). The component also interacts with other parts of the SOFA framework via its inheritance from base classes and use of internal factories for creating specific task schedulers.</p>\n\n<p><strong>Practical Usage Guidance:</strong></p>\n\n<ul>\n<li>The `nbThreads` parameter allows users to specify the number of threads for parallel execution. Setting a negative value dynamically adjusts the thread count based on available CPU cores.</li>\n</ul>",
"maths": "The `TaskSchedulerUser` component in the SOFA framework is not directly involved in the mathematical or physical aspects of finite element simulations. Instead, it focuses on managing and controlling task schedulers for parallel execution. This component does not contribute to any specific governing equations, constitutive laws, kinematic laws, or numerical methods used within the FEM simulation pipeline. Its primary role is to initialize, reinitialize, and stop a task scheduler based on user-specified parameters such as the number of threads (`d_nbThreads`) and the type of task scheduler (`d_taskSchedulerType`). This ensures efficient parallel execution of tasks in the SOFA framework. Therefore, there are no mathematical or physical equations directly associated with this component.",
"abstract": "`TaskSchedulerUser` manages task schedulers in SOFA by initializing, reinitializing, and stopping them based on specified thread counts. It controls parallel execution to ensure efficient task scheduling.",
"sheet": "\n# TaskSchedulerUser\n\n## Overview\nThe `TaskSchedulerUser` component is responsible for managing task schedulers within the SOFA framework. Its primary role is to initialize, reinitialize, and stop a task scheduler based on user-specified parameters such as the number of threads (`d_nbThreads`). This ensures efficient parallel execution of tasks.\n\n## Parameters and Data\n- **nbThreads**: An integer field specifying the number of threads for the task scheduler. A negative value indicates that the specified number should be subtracted from the total available CPU cores."
}