Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
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.