20 #include <rmm/detail/export.hpp>
22 #include <cuda_runtime_api.h>
27 namespace RMM_EXPORT rmm {
81 [[nodiscard]] cudaStream_t
value()
const;
86 explicit operator cudaStream_t() const noexcept;
109 void synchronize() const;
116 void synchronize_no_throw() const noexcept;
119 std::unique_ptr<cudaStream_t, std::function<
void(cudaStream_t*)>> stream_;
Strongly-typed non-owning wrapper for CUDA streams with default constructor.
Definition: cuda_stream_view.hpp:39
Owning wrapper for a CUDA stream.
Definition: cuda_stream.hpp:39
bool is_valid() const
Returns true if the owned stream is non-null.
cuda_stream()
Construct a new cuda stream object.
cuda_stream & operator=(cuda_stream &&)=default
Move copy assignment operator (default)
cudaStream_t value() const
Get the value of the wrapped CUDA stream.
cuda_stream(cuda_stream &&)=default
Move constructor (default)