oa::Engine

The engine is deliberately concrete and pinned. Optional presentation, video and collective services compose with it; they do not subclass it.

Public Methods

oa::Result<oa::ClockCalibration> oa::Engine::calibrateClock(oa::U32 inSampleCount = 8U)
oa::Result<oa::ExecutionPlan> oa::Engine::capture(oa::Fn<void ()> inRecord)
oa::Status oa::Engine::close()
oa::StringView oa::Engine::deviceName()
oa::DeviceType oa::Engine::deviceType()
oa::StringView oa::Engine::deviceVendorName()
oa::U64 oa::Engine::deviceVramBytes()
oa::StringView oa::Engine::driverName()
oa::StringView oa::Engine::driverVersion()
oa::MemoryUsage oa::Engine::getMemoryUsage()
oa::Precision oa::Engine::getPrecision()
EngineState oa::Engine::getState()
bool oa::Engine::hasCompute()
bool oa::Engine::hasGraphics()
bool oa::Engine::isReady()
const oa::ExecutionStats & oa::Engine::lastExecutionStats()
bool oa::Engine::ownsEvent(const oa::Event & inEvent)
oa::Result<oa::Event> oa::Engine::submit(oa::ExecutionPlan & inPlan)
oa::Result<oa::Event> oa::Engine::submit(oa::Timer * inTimer = nullptr)
bool oa::Engine::supportsClockCalibration()
oa::StringView oa::Engine::vulkanApiVersion()
oa::Status oa::Engine::wait(const oa::Event & inEvent)

Static Public Methods

static oa::Result<oa::UniquePtr<Engine>> oa::Engine::create(const EngineConfig & inConfig = {})

Constructor & Destructor Documentation

void oa::Engine::~Engine()
No public source comment is attached to this declaration.

Public Method Documentation

oa::Result<oa::ClockCalibration> oa::Engine::calibrateClock( oa::U32 inSampleCount = 8U )
query the device and a POSIX monotonic clock quasi-simultaneously and return the lowest-deviation sample. Unsupported devices return oa::StatusCode::Unavailable; no guessed host/device offset is substituted.

Parameters

inSampleCount
oa::U32

Default: 8U

Returns

oa::Result<oa::ClockCalibration>

The declared return value.

oa::Result<oa::ExecutionPlan> oa::Engine::capture( oa::Fn<void ()> inRecord )
Record one isolated semantic region and compile it into immutable reusable work. capture() restores the previously selected recorder and never submits or waits. The returned plan borrows this engine, which must outlive it.

Parameters

inRecord
oa::Fn<void ()>

Returns

oa::Result<oa::ExecutionPlan>

The declared return value.

oa::Status oa::Engine::close()
Explicit shutdown boundary. close() drains engine-owned submissions, releases resources, and reports completion failures.

Returns

oa::Status

The declared return value.

oa::StringView oa::Engine::deviceName()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::DeviceType oa::Engine::deviceType()
No public source comment is attached to this declaration.

Returns

oa::DeviceType

The declared return value.

oa::StringView oa::Engine::deviceVendorName()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::U64 oa::Engine::deviceVramBytes()
No public source comment is attached to this declaration.

Returns

oa::U64

The declared return value.

oa::StringView oa::Engine::driverName()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::StringView oa::Engine::driverVersion()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::MemoryUsage oa::Engine::getMemoryUsage()
No public source comment is attached to this declaration.

Returns

oa::MemoryUsage

The declared return value.

oa::Precision oa::Engine::getPrecision()
No public source comment is attached to this declaration.

Returns

oa::Precision

The declared return value.

EngineState oa::Engine::getState()
No public source comment is attached to this declaration.

Returns

EngineState

The declared return value.

bool oa::Engine::hasCompute()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::Engine::hasGraphics()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::Engine::isReady()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

const oa::ExecutionStats & oa::Engine::lastExecutionStats()
No public source comment is attached to this declaration.

Returns

const oa::ExecutionStats &

The declared return value.

bool oa::Engine::ownsEvent( const oa::Event & inEvent )
Boolean provenance check for completion-consuming APIs.

Parameters

inEvent
const oa::Event &

Returns

bool

The declared return value.

oa::Result<oa::Event> oa::Engine::submit( oa::ExecutionPlan & inPlan )
submit one compiled plan without waiting. The exact event is the host and cross-queue completion boundary; the plan may be resubmitted while alive.

Parameters

inPlan
oa::ExecutionPlan &

Returns

oa::Result<oa::Event>

The declared return value.

oa::Result<oa::Event> oa::Engine::submit( oa::Timer * inTimer = nullptr )
submit the current eager recording without waiting.

Parameters

inTimer
oa::Timer *

Default: nullptr

Returns

oa::Result<oa::Event>

The declared return value.

bool oa::Engine::supportsClockCalibration()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::StringView oa::Engine::vulkanApiVersion()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::Status oa::Engine::wait( const oa::Event & inEvent )
wait for an event owned by this engine. Waiting the exact eager event also reclaims its private one-shot recording state; plan and service events are ordinary idempotent waits.

Parameters

inEvent
const oa::Event &

Returns

oa::Status

The declared return value.

static oa::Result<oa::UniquePtr<Engine>> oa::Engine::create( const EngineConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inConfig
const EngineConfig &

Default: {}

Returns

oa::Result<oa::UniquePtr<Engine>>

The declared return value.