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.
| rmm::cuda_stream::cuda_stream | ( | ) |
Construct a new cuda stream object.
| rmm::cuda_error | if stream creation fails |
| bool rmm::cuda_stream::is_valid | ( | ) | const |
Returns true if the owned stream is non-null.
| rmm::cuda_stream::operator cuda_stream_view | ( | ) | const |
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.
| void rmm::cuda_stream::synchronize | ( | ) | const |
Synchronize the owned CUDA stream.
Calls cudaStreamSynchronize().
| rmm::cuda_error | if stream synchronization fails |
|
noexcept |
Synchronize the owned CUDA stream. Does not throw if there is an error.
Calls cudaStreamSynchronize() and asserts if there is an error.
| cudaStream_t rmm::cuda_stream::value | ( | ) | const |
Get the value of the wrapped CUDA stream.
| cuda_stream_view rmm::cuda_stream::view | ( | ) | const |
Creates an immutable, non-owning view of the wrapped CUDA stream.