Loading...
Searching...
No Matches
opennn::BatchPrefetchSession Struct Reference

#include <opennn/dataset/batch.h>

Public Member Functions

 BatchPrefetchSession (ThreadSafeQueue< Batch * > &, Index batches_number)
 
 ~BatchPrefetchSession ()
 
 BatchPrefetchSession (const BatchPrefetchSession &)=delete
 
BatchPrefetchSession & operator= (const BatchPrefetchSession &)=delete
 
Batch * wait (Index iteration)
 
bool publish (Index iteration, Batch *batch)
 
bool acquire (Batch *&batch)
 
void release (Batch *batch)
 
Index claim_iteration ()
 
template<typename Worker>
void add_worker (Worker &&worker)
 
void capture_current_exception ()
 
void rethrow_if_error ()
 

Constructor & Destructor Documentation

◆ BatchPrefetchSession() [1/2]

opennn::BatchPrefetchSession::BatchPrefetchSession ( ThreadSafeQueue< Batch * > & ,
Index batches_number )

◆ ~BatchPrefetchSession()

opennn::BatchPrefetchSession::~BatchPrefetchSession ( )

◆ BatchPrefetchSession() [2/2]

opennn::BatchPrefetchSession::BatchPrefetchSession ( const BatchPrefetchSession & )
delete

Member Function Documentation

◆ acquire()

bool opennn::BatchPrefetchSession::acquire ( Batch *& batch)
inline

◆ add_worker()

template<typename Worker>
void opennn::BatchPrefetchSession::add_worker ( Worker && worker)
inline

◆ capture_current_exception()

void opennn::BatchPrefetchSession::capture_current_exception ( )

◆ claim_iteration()

Index opennn::BatchPrefetchSession::claim_iteration ( )
inline

◆ operator=()

BatchPrefetchSession & opennn::BatchPrefetchSession::operator= ( const BatchPrefetchSession & )
delete

◆ publish()

bool opennn::BatchPrefetchSession::publish ( Index iteration,
Batch * batch )

◆ release()

void opennn::BatchPrefetchSession::release ( Batch * batch)
inline

◆ rethrow_if_error()

void opennn::BatchPrefetchSession::rethrow_if_error ( )

◆ wait()

Batch * opennn::BatchPrefetchSession::wait ( Index iteration)