Skip to content

tenzr::execution::StreamEvent

Handle to a recorded point in a stream's work, used to query completion or to make later work wait.

#include <stream.h>

Public Functions

Name
StreamEvent()
Construct an event with no backing PJRT event.
StreamEvent(PJRT_Event * pjrt_event)
~StreamEvent() =default
StreamEvent(const StreamEvent & ) =default
StreamEvent & operator=(const StreamEvent & ) =default
StreamEvent(StreamEvent && ) =default
StreamEvent & operator=(StreamEvent && ) =default
void Record(ExecutionStream & stream)
Record the event on a stream after its previously queued work.
bool Query() const
Query completion without blocking.
void Synchronize()
Block until the event completes.
std::shared_ptr< StreamEventState > State() const
Access the shared readiness state.

Public Functions Documentation

function StreamEvent

StreamEvent()

Construct an event with no backing PJRT event.

function StreamEvent

explicit StreamEvent(
    PJRT_Event * pjrt_event
)

Parameters:

  • pjrt_event PJRT event to observe.

Construct an event wrapping a PJRT event handle.

function ~StreamEvent

~StreamEvent() =default

function StreamEvent

StreamEvent(
    const StreamEvent & 
) =default

function operator=

StreamEvent & operator=(
    const StreamEvent & 
) =default

function StreamEvent

StreamEvent(
    StreamEvent && 
) =default

function operator=

StreamEvent & operator=(
    StreamEvent && 
) =default

function Record

void Record(
    ExecutionStream & stream
)

Record the event on a stream after its previously queued work.

Parameters:

  • stream Stream on which to record the event.

Record this event on stream.

function Query

bool Query() const

Query completion without blocking.

Return: true when the event has completed.

Non-blocking readiness query.

function Synchronize

void Synchronize()

Block until the event completes.

function State

inline std::shared_ptr< StreamEventState > State() const

Access the shared readiness state.