cuda::experimental::stream_ref

Defined in include/cuda/experimental/__stream/stream_ref.cuh

struct stream_ref : public stream_ref

A non-owning wrapper for cudaStream_t.

Note

It is undefined behavior to use a stream_ref object beyond the lifetime of the stream it was created from, except for the get() member function.

Subclassed by cuda::experimental::stream

Public Types

using scheduler_concept = execution::scheduler_t

Public Functions

stream_ref() = delete
inline constexpr stream_ref(const ::cuda::stream_ref &__other) noexcept

Converting constructor from ::cuda::stream_ref.

Post

*this == __other

inline bool ready() const

Deprecated. Use is_done() instead.

inline auto schedule() const noexcept

Returns a execution::sender that completes on this stream.

Note

Equivalent to execution::schedule(execution::stream_scheduler{*this}).

inline logical_device logical_device() const

Get the logical device under which this stream was created.

Compared to device() member function the returned logical_device will hold a green context for streams created under one.

Public Static Functions

static inline constexpr auto query(const execution::get_forward_progress_guarantee_t&) noexcept -> execution::forward_progress_guarantee
static inline constexpr auto query(const execution::get_domain_t&) noexcept -> execution::stream_domain