Gromacs
2024.3
|
#include <gromacs/gpu_utils/device_stream_manager.h>
Device stream and context manager.
Manages the lifetime of the GPU streams and their association with context and device information that is needed to use them.
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 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 GPU context. More... | |
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.
InternalError | If any of the required resources could not be initialized. |
const DeviceContext & gmx::DeviceStreamManager::context | ( | ) | const |
Returns a handle to the GPU context.
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. |