Gromacs
2026.0-dev-20250113-1a1a8db
|
#include <gromacs/gpu_utils/device_stream_manager.h>
Device stream and context manager.
Given information on which device to use and what to compute with it, objects of this class manage the lifetime of the GPU context and streams.
If supported by the GPU API, the available runtime and the indicated device, some streams will be configured at high priority. Otherwise, all streams will share the default priority appropriate to the situation.
Classes | |
class | Impl |
Impl class to manages the lifetime of the GPU context and streams. More... | |
Public Member Functions | |
DeviceStreamManager (const DeviceInformation &deviceInfo, SimulationWorkload simulationWork, bool useTiming) | |
Constructor. More... | |
const DeviceInformation & | deviceInfo () const |
Get the device information object of the associated device. More... | |
const DeviceContext & | context () const |
Returns a handle to the device context. | |
const DeviceStream & | stream (DeviceStreamType streamToGet) const |
Returns a handle to the requested GPU stream. More... | |
const DeviceStream & | bondedStream () const |
Returns a handle to the GPU stream to compute bonded forces in. | |
bool | streamIsValid (DeviceStreamType streamToCheck) const |
Return whether the requested GPU stream is valid for use. More... | |
gmx::DeviceStreamManager::DeviceStreamManager | ( | const DeviceInformation & | deviceInfo, |
SimulationWorkload | simulationWork, | ||
bool | useTiming | ||
) |
Constructor.
Activates the device described by deviceInfo
InternalError | If any of the required resources could not be initialized. |
const DeviceInformation & gmx::DeviceStreamManager::deviceInfo | ( | ) | const |
Get the device information object of the associated device.
const DeviceStream & gmx::DeviceStreamManager::stream | ( | DeviceStreamType | streamToGet | ) | const |
Returns a handle to the requested GPU stream.
[in] | streamToGet | Which stream to get. |
bool gmx::DeviceStreamManager::streamIsValid | ( | DeviceStreamType | streamToCheck | ) | const |
Return whether the requested GPU stream is valid for use.
[in] | streamToCheck | Which stream to check. |