batchlas::Event Struct Reference

Overview

Completion handle of enqueued work, returned by every entry point.

Waiting on it (or on the Queue) is what makes results readable. On the default in-order Queue, later calls on the same Queue are already ordered after it, so it may be ignored there; it is needed to order work across an out-of-order Queue, a second Queue sharing the context, or raw SYCL (see <batchlas/sycl_interop.hh>). The type is [[nodiscard]]: discard one deliberately with (void). Movable, not copyable.

Definition at line 279 of file sycl-device-queue.hh.

#include <batchlas/util/sycl-device-queue.hh>

Constructors

◆ Event() [1/3]

batchlas::Event::Event ( )

An empty Event, already complete.

◆ ~Event()

batchlas::Event::~Event ( )

◆ Event() [2/3]

batchlas::Event::Event ( EventImpl && impl)

◆ Event() [3/3]

batchlas::Event::Event ( Event && other)

Functions

◆ operator=() [1/2]

Event & batchlas::Event::operator= ( EventImpl && impl)

◆ operator=() [2/2]

Event & batchlas::Event::operator= ( Event && other)

◆ wait()

void batchlas::Event::wait ( ) const

Block until the work this Event tracks has completed.

Precondition
The Event is not moved-from.

◆ operator->()

EventImpl * batchlas::Event::operator-> ( ) const

◆ operator*()

EventImpl & batchlas::Event::operator* ( ) const

◆ profiling_command_start_end_ns()

std::optional< std::pair< std::uint64_t, std::uint64_t > > batchlas::Event::profiling_command_start_end_ns ( ) const

{command_start, command_end} in nanoseconds, or std::nullopt when profiling is not enabled on the underlying SYCL queue (see DiagnosticsSettings::profiling).

Variables

◆ impl_

std::unique_ptr<EventImpl> batchlas::Event::impl_

Implementation; null only for a moved-from Event.

Definition at line 280 of file sycl-device-queue.hh.