|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
CUDA runtime control interface for Tissue Forge engine. More...
#include <tfEngineConfig.h>
Public Member Functions | |
| bool | onDevice () |
| Check whether the engine is currently on a device. | |
| int | getDevice () |
| Get the id of the device running the engine. | |
| HRESULT | setDevice (int deviceId=0) |
| Set the id of the device for running the engine. | |
| HRESULT | clearDevice () |
| Clear configured device for the engine. | |
| HRESULT | toDevice () |
| Send engine to device. If engine is already on device, then the call is ignored. | |
| HRESULT | fromDevice () |
| Pull engine from device. If engine is not on a device, then the call is ignored. | |
| HRESULT | setBlocks (unsigned int numBlocks, int deviceId=-1) |
| Set the number of blocks of the CUDA configuration for a CUDA device. | |
| HRESULT | setThreads (unsigned int numThreads, int deviceId=-1) |
| Set the number of threads of the CUDA configuration for a CUDA device. | |
| HRESULT | refreshPotentials () |
| Update potentials on a CUDA device. | |
| HRESULT | refreshFluxes () |
| Update fluxes on a CUDA device. | |
| HRESULT | refreshBoundaryConditions () |
| Update boundary conditions on a CUDA device. | |
| HRESULT | refresh () |
| Update the image of the engine on a CUDA device. | |
CUDA runtime control interface for Tissue Forge engine.
This object provides control for configuring engine calculations on CUDA devices. Associated calculations include nonbonded particle interactions and sorting, fluxes and space partitioning.
At any time during a simulation, supported engine calculations can be sent to a particular CUDA device, or brought back to the CPU when deployed on a CUDA device. CUDA dynamic parallelism can also be specified before deploying engine calculations to a CUDA device. Future Tissue Forge versions will support deployment on multiple devices.
| HRESULT TissueForge::cuda::EngineConfig::clearDevice | ( | ) |
| HRESULT TissueForge::cuda::EngineConfig::fromDevice | ( | ) |
Pull engine from device. If engine is not on a device, then the call is ignored.
| int TissueForge::cuda::EngineConfig::getDevice | ( | ) |
Get the id of the device running the engine.
Returns -1 if engine is not on a device.
| bool TissueForge::cuda::EngineConfig::onDevice | ( | ) |
Check whether the engine is currently on a device.
| HRESULT TissueForge::cuda::EngineConfig::refresh | ( | ) |
Update the image of the engine on a CUDA device.
Necessary to notify the device of changes to engine data that are not automatically handled by Tissue Forge. Refer to documentation of specific functions and members for which Tissue Forge automatically handles.
If engine is not on a device, then the call is ignored.
| HRESULT TissueForge::cuda::EngineConfig::refreshBoundaryConditions | ( | ) |
Update boundary conditions on a CUDA device.
Useful for notifying the device that a boundary condition has changed.
If engine is not on a device, then the call is ignored.
| HRESULT TissueForge::cuda::EngineConfig::refreshFluxes | ( | ) |
Update fluxes on a CUDA device.
Useful for notifying the device that a flux has changed.
If engine is not on a device, then the call is ignored.
| HRESULT TissueForge::cuda::EngineConfig::refreshPotentials | ( | ) |
Update potentials on a CUDA device.
Useful for notifying the device that a potential has changed.
If engine is not on a device, then the call is ignored.
| HRESULT TissueForge::cuda::EngineConfig::setBlocks | ( | unsigned int | numBlocks, |
| int | deviceId = -1 ) |
Set the number of blocks of the CUDA configuration for a CUDA device.
Throws an error if called when the engine is already deployed to a CUDA device.
| numBlocks | number of blocks |
| deviceId | device ID (optional) |
| HRESULT TissueForge::cuda::EngineConfig::setDevice | ( | int | deviceId = 0 | ) |
Set the id of the device for running the engine.
Fails if engine is currently on a device.
| deviceId |
| HRESULT TissueForge::cuda::EngineConfig::setThreads | ( | unsigned int | numThreads, |
| int | deviceId = -1 ) |
Set the number of threads of the CUDA configuration for a CUDA device.
Throws an error if called when the engine is already deployed to a CUDA device.
| numThreads | number of threads |
| deviceId | device ID (optional) |
| HRESULT TissueForge::cuda::EngineConfig::toDevice | ( | ) |
Send engine to device. If engine is already on device, then the call is ignored.