|
Celeritas 0.7.0-dev.179+develop.ec08af0c9
|
PIMPL class for CUDA or HIP stream. More...
#include <Stream.hh>
Classes | |
| struct | Impl |
Public Types | |
Type aliases | |
| using | MissingDeviceRuntime = void |
| using | ResourceT = detail::AsyncMemoryResource |
Public Member Functions | |
| Stream () | |
| Construct by creating a stream. | |
| CELER_DEFAULT_MOVE_DELETE_COPY (Stream) | |
| MissingDeviceRuntime | get () const |
| Get the CUDA stream pointer. | |
| ResourceT & | memory_resource () |
| Get the Thrust async allocation resource. | |
| void | sync () const |
| Synchronize this stream. | |
| void * | malloc_async (std::size_t bytes) const |
| Allocate memory asynchronously on this stream if possible. | |
| void | free_async (void *ptr) const |
| Free memory asynchronously on this stream if possible. | |
PIMPL class for CUDA or HIP stream.
This creates/destroys a stream on construction/destruction and provides accessors to low-level stream-related functionality. This class will typically be accessed only by low-level device implementations or advanced kernels that need to interact with the device stream.
corecel/sys/detail/AsyncMemoryResource.device.hh .
|
inline |
Allocate memory asynchronously on this stream if possible.
HIP 5.1 and lower does not support async allocation.