oa::Environment

Stateful native environment session. The session borrows one Engine and privately owns its recorder/execution state. reset/step remain stateful commands; submit returns the exact completion for every command recorded since the previous completion. The public boundary never exposes context or queue controls.

Public Methods

oa::Status oa::Environment::begin()
oa::Status oa::Environment::cancel()
oa::Status oa::Environment::close()
oa::U32 oa::Environment::environments()
bool oa::Environment::hasActiveRecording()
bool oa::Environment::hasPendingEvent()
bool oa::Environment::isOpen()
const oa::Matrix & oa::Environment::observation()
oa::Status oa::Environment::recordCommands(const oa::Fn<oa::Status ()> & inCommands)
oa::Status oa::Environment::reset(oa::U64 inSeed)
oa::Status oa::Environment::resetCompleted()
const EnvironmentSpec & oa::Environment::spec()
oa::Result<EnvironmentTransition> oa::Environment::step(const oa::Matrix & inAction)
oa::U64 oa::Environment::submissionCount()
oa::Result<oa::Event> oa::Environment::submit()
oa::Status oa::Environment::wait(const oa::Event & inEvent)

Constructor & Destructor Documentation

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

Public Method Documentation

oa::Status oa::Environment::begin()
begin is idempotent while recording. recordCommands selects the owned execution session only for the callback's dynamic extent, so ambient context state is restored even on failure. A callback failure cancels the whole unsubmitted transaction.

Returns

oa::Status

The declared return value.

oa::Status oa::Environment::cancel()
cancel discards only unsubmitted commands. close completes an already submitted event, discards unsubmitted commands, and is idempotent.

Returns

oa::Status

The declared return value.

oa::Status oa::Environment::close()
No public source comment is attached to this declaration.

Returns

oa::Status

The declared return value.

oa::U32 oa::Environment::environments()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

bool oa::Environment::hasActiveRecording()
True after begin or the first recorded command and until submit accepts the transaction or cancel discards it. Host snapshots must reject this state because recorded writes have not reached the device.

Returns

bool

The declared return value.

bool oa::Environment::hasPendingEvent()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::Environment::isOpen()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

const oa::Matrix & oa::Environment::observation()
No public source comment is attached to this declaration.

Returns

const oa::Matrix &

The declared return value.

oa::Status oa::Environment::recordCommands( const oa::Fn<oa::Status ()> & inCommands )
No public source comment is attached to this declaration.

Parameters

inCommands
const oa::Fn<oa::Status ()> &

Returns

oa::Status

The declared return value.

oa::Status oa::Environment::reset( oa::U64 inSeed )
No public source comment is attached to this declaration.

Parameters

inSeed
oa::U64

Returns

oa::Status

The declared return value.

oa::Status oa::Environment::resetCompleted()
No public source comment is attached to this declaration.

Returns

oa::Status

The declared return value.

const EnvironmentSpec & oa::Environment::spec()
No public source comment is attached to this declaration.

Returns

const EnvironmentSpec &

The declared return value.

oa::Result<EnvironmentTransition> oa::Environment::step( const oa::Matrix & inAction )
No public source comment is attached to this declaration.

Parameters

inAction
const oa::Matrix &

Returns

oa::Result<EnvironmentTransition>

The declared return value.

oa::U64 oa::Environment::submissionCount()
No public source comment is attached to this declaration.

Returns

oa::U64

The declared return value.

oa::Result<oa::Event> oa::Environment::submit()
No public source comment is attached to this declaration.

Returns

oa::Result<oa::Event>

The declared return value.

oa::Status oa::Environment::wait( const oa::Event & inEvent )
No public source comment is attached to this declaration.

Parameters

inEvent
const oa::Event &

Returns

oa::Status

The declared return value.