cuda::experimental::stf::stream_and_event
Defined in include/cuda/experimental/__stf/stream/internal/event_types.cuh
-
class stream_and_event : public cuda::experimental::stf::event_impl
Public Functions
-
inline void insert_event()
-
inline void insert_dep(async_resources_handle &async_resources, const stream_and_event &from)
-
inline virtual bool factorize(reserved::event_vector &events) override
Remove implicit dependencies already induced by more recent events using the same stream.
-
inline virtual void sync_with_stream(backend_ctx_untyped &bctx, event_list &prereqs, cudaStream_t stream) const override
-
inline cudaStream_t get_stream() const
-
inline decorated_stream get_decorated_stream() const
-
inline ::std::ptrdiff_t get_stream_id() const
-
inline cudaEvent_t get_cuda_event() const
-
inline bool operator==(const event_impl &e) const
Compares this event with another event for equality based on their unique identifiers.
- Parameters
e – The event to compare with.
- Returns
True if the events have the same unique identifier, false otherwise.
-
inline bool operator<(const event_impl &e) const
Compares this event with another event for ordering based on their unique identifiers.
- Parameters
e – The event to compare with.
- Returns
True if this event’s unique identifier is less than the other event’s identifier, false otherwise.
-
template<typename context_t>
inline void set_symbol(context_t &ctx, ::std::string s) Sets a symbolic name for the event, useful for debugging or tracing.
- Parameters
s – The symbolic name to associate with this event.
-
inline virtual event_list from_stream(backend_ctx_untyped&, cudaStream_t) const
-
inline const ::std::string &get_symbol() const
Retrieves the symbolic name of the event.
- Returns
The symbolic name of the event. Generates a default name if none was set.
Public Members
-
mutable reserved::unique_id_t unique_prereq_id
A unique identifier for the event, used to ensure proper event ordering.
-
::std::atomic<int> outbound_deps = 0
Public Static Functions
-
static inline void insert_dependency(cudaStream_t s1, cudaStream_t s2)
Protected Functions
-
stream_and_event() = default
-
stream_and_event(const stream_and_event&) = delete
-
stream_and_event &operator=(const stream_and_event&) = delete
-
stream_and_event(stream_and_event&&) = delete
-
inline ~stream_and_event() override
-
inline stream_and_event(const decorated_stream &dstream, bool do_insert_event)
Protected Attributes
-
mutable ::std::string symbol
The symbolic name associated with the event, mutable to allow lazy initialization.
-
inline void insert_event()