RMM
23.12
RAPIDS Memory Manager
|
Owning wrapper for a CUDA stream. More...
#include <cuda_stream.hpp>
Public Member Functions | |
cuda_stream (cuda_stream &&)=default | |
Move constructor (default) More... | |
cuda_stream & | operator= (cuda_stream &&)=default |
Move copy assignment operator (default) More... | |
cuda_stream (cuda_stream const &)=delete | |
cuda_stream & | operator= (cuda_stream &)=delete |
cuda_stream () | |
Construct a new cuda stream object. More... | |
bool | is_valid () const |
Returns true if the owned stream is non-null. More... | |
cudaStream_t | value () const |
Get the value of the wrapped CUDA stream. More... | |
operator cudaStream_t () const noexcept | |
Explicit conversion to cudaStream_t. | |
cuda_stream_view | view () const |
Creates an immutable, non-owning view of the wrapped CUDA stream. More... | |
operator cuda_stream_view () const | |
Implicit conversion to cuda_stream_view. More... | |
void | synchronize () const |
Synchronize the owned CUDA stream. More... | |
void | synchronize_no_throw () const noexcept |
Synchronize the owned CUDA stream. Does not throw if there is an error. More... | |
Owning wrapper for a CUDA stream.
Provides RAII lifetime semantics for a CUDA stream.
|
default |
Move constructor (default)
A moved-from cuda_stream is invalid and it is Undefined Behavior to call methods that access the owned stream.
|
inline |
Construct a new cuda stream object.
rmm::cuda_error | if stream creation fails |
|
inline |
Returns true if the owned stream is non-null.
|
inline |
Implicit conversion to cuda_stream_view.
|
default |
Move copy assignment operator (default)
A moved-from cuda_stream is invalid and it is Undefined Behavior to call methods that access the owned stream.
|
inline |
Synchronize the owned CUDA stream.
Calls cudaStreamSynchronize()
.
rmm::cuda_error | if stream synchronization fails |
|
inlinenoexcept |
Synchronize the owned CUDA stream. Does not throw if there is an error.
Calls cudaStreamSynchronize()
and asserts if there is an error.
|
inline |
Get the value of the wrapped CUDA stream.
|
inline |
Creates an immutable, non-owning view of the wrapped CUDA stream.