oa::Timer

Timer class in the OA Core public surface.

Public Methods

oa::Status oa::Timer::begin()
oa::Result<oa::F64> oa::Timer::commit(const oa::Engine & inEngine, oa::F64 inUnits = 1.0)
oa::Result<oa::F64> oa::Timer::commit(oa::F64 inUnits = 1.0)
oa::TimerDomain oa::Timer::domain()
oa::F64 oa::Timer::elapsedMs()
oa::Status oa::Timer::end()
oa::StringView oa::Timer::getName()
oa::Status oa::Timer::init(oa::Engine & inEngine, oa::StringView inName = = {})
oa::Bool oa::Timer::isDevice()
oa::Bool oa::Timer::isHost()
oa::Bool oa::Timer::isInitialized()
oa::Bool oa::Timer::isPending()
oa::F64 oa::Timer::throughput()

Constructor & Destructor Documentation

oa::Timer::Timer( oa::TimerDomain inDomain = oa::TimerDomain::Auto, oa::StringView inName = = {} )
No public source comment is attached to this declaration.

Parameters

inDomain
oa::TimerDomain

Default: oa::TimerDomain::Auto

inName
oa::StringView

Default: = {}

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

Public Method Documentation

oa::Status oa::Timer::begin()
Host-region boundaries. Auto resolves to Host when Begin is the first operation. Device timestamps are bracketed by oa::Engine::submit(timer).

Returns

oa::Status

The declared return value.

oa::Result<oa::F64> oa::Timer::commit( const oa::Engine & inEngine, oa::F64 inUnits = 1.0 )
commit reports a status instead of converting unavailable/incomplete measurements into a plausible 0 ms sample. Device commit never waits: the exact submission event must already be complete. Host commit has no engine.

Parameters

inEngine
const oa::Engine &

inUnits
oa::F64

Default: 1.0

Returns

oa::Result<oa::F64>

The declared return value.

oa::Result<oa::F64> oa::Timer::commit( oa::F64 inUnits = 1.0 )
No public source comment is attached to this declaration.

Parameters

inUnits
oa::F64

Default: 1.0

Returns

oa::Result<oa::F64>

The declared return value.

oa::TimerDomain oa::Timer::domain()
No public source comment is attached to this declaration.

Returns

oa::TimerDomain

The declared return value.

oa::F64 oa::Timer::elapsedMs()
No public source comment is attached to this declaration.

Returns

oa::F64

The declared return value.

oa::Status oa::Timer::end()
No public source comment is attached to this declaration.

Returns

oa::Status

The declared return value.

oa::StringView oa::Timer::getName()
No public source comment is attached to this declaration.

Returns

oa::StringView

The declared return value.

oa::Status oa::Timer::init( oa::Engine & inEngine, oa::StringView inName = = {} )
Select and acquire this engine's device timestamp backend. Auto resolves to Device here. Host timers need no engine and init is a no-op for them.

Parameters

inEngine
oa::Engine &

inName
oa::StringView

Default: = {}

Returns

oa::Status

The declared return value.

oa::Bool oa::Timer::isDevice()
No public source comment is attached to this declaration.

Returns

oa::Bool

The declared return value.

oa::Bool oa::Timer::isHost()
No public source comment is attached to this declaration.

Returns

oa::Bool

The declared return value.

oa::Bool oa::Timer::isInitialized()
No public source comment is attached to this declaration.

Returns

oa::Bool

The declared return value.

oa::Bool oa::Timer::isPending()
No public source comment is attached to this declaration.

Returns

oa::Bool

The declared return value.

oa::F64 oa::Timer::throughput()
No public source comment is attached to this declaration.

Returns

oa::F64

The declared return value.