oa::ReplayBuffer

Preallocated circular off-policy storage. Appends and deterministic uniform sampling stay on the GPU; size/cursor are host control metadata and never depend on a tensor readback.

Public Methods

oa::Status oa::ReplayBuffer::append(const ReplayTransition & inTransition)
oa::U32 oa::ReplayBuffer::capacity()
const ReplayConfig & oa::ReplayBuffer::config()
oa::U32 oa::ReplayBuffer::cursor()
bool oa::ReplayBuffer::isFull()
bool oa::ReplayBuffer::isValid()
void oa::ReplayBuffer::reset()
oa::Result<ReplayBatch> oa::ReplayBuffer::sample(oa::U32 inBatchSize, oa::U64 inSeed)
oa::U32 oa::ReplayBuffer::size()

Static Public Methods

static oa::Result<ReplayBuffer> oa::ReplayBuffer::create(const ReplayConfig & inConfig)

Public Method Documentation

oa::Status oa::ReplayBuffer::append( const ReplayTransition & inTransition )
No public source comment is attached to this declaration.

Parameters

inTransition
const ReplayTransition &

Returns

oa::Status

The declared return value.

oa::U32 oa::ReplayBuffer::capacity()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

const ReplayConfig & oa::ReplayBuffer::config()
No public source comment is attached to this declaration.

Returns

const ReplayConfig &

The declared return value.

oa::U32 oa::ReplayBuffer::cursor()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

bool oa::ReplayBuffer::isFull()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::ReplayBuffer::isValid()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

void oa::ReplayBuffer::reset()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

oa::Result<ReplayBatch> oa::ReplayBuffer::sample( oa::U32 inBatchSize, oa::U64 inSeed )
No public source comment is attached to this declaration.

Parameters

inBatchSize
oa::U32

inSeed
oa::U64

Returns

oa::Result<ReplayBatch>

The declared return value.

oa::U32 oa::ReplayBuffer::size()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

static oa::Result<ReplayBuffer> oa::ReplayBuffer::create( const ReplayConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inConfig
const ReplayConfig &

Returns

oa::Result<ReplayBuffer>

The declared return value.