ADOL-C: Automatic Differentiation in C/C++ 2.7.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ADOLC::detail::TapeEvaluationContext Struct Reference

Per-sweep state used while evaluating a recorded tape. More...

#include <tapeevaluationcontext.h>

Collaboration diagram for ADOLC::detail::TapeEvaluationContext:
Collaboration graph
[legend]

Public Types

using StatEntries = TapeInfos::StatEntries
 

Public Member Functions

 ~TapeEvaluationContext ()
 
 TapeEvaluationContext ()=delete
 
 TapeEvaluationContext (const TapeRecordingContext &tapeCtx, TapeInfos::StatArray stats, std::shared_lock< std::shared_mutex > &&lock, std::shared_lock< std::shared_mutex > &&dataAccessLock)
 
 TapeEvaluationContext (TapeRecordingContext &&other, std::unique_lock< std::shared_mutex > &&lock, std::shared_lock< std::shared_mutex > &&dataAccessLock) noexcept
 
 TapeEvaluationContext (const TapeEvaluationContext &)=delete
 
TapeEvaluationContext & operator= (const TapeEvaluationContext &)=delete
 
 TapeEvaluationContext (TapeEvaluationContext &&other) noexcept
 
TapeEvaluationContext & operator= (TapeEvaluationContext &&other) noexcept=delete
 
void closeSweepFiles ()
 
void releaseTo (TapeRecordingContext &recordCtx)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
void openFile (const char *fileName)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
void put_block (const char *fileName, size_t lengthBlock)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
void loadBlockIntoBuffer (size_t blockSize)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
void loadBlockIntoBufferForward (size_t bufferSize)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
void loadBlockIntoBufferReverse (size_t blockSize)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
Info::value_type loadNextReverse (size_t blockSize)
 
template<InfoType< TapeEvaluationContext, ErrorType > Info>
Info::value_type loadNextForward ()
 
double * get_val_v_f (size_t size)
 
double * get_val_v_r (size_t size)
 
void reset_val_r (size_t valueBufferSize)
 
void discard_params_r (size_t valueBufferSize, size_t numParam)
 
void finish_tay_file (const char *tay_fileName)
 
void taylor_begin (int degreeSave, size_t taylorBufferSize, const char *tay_fileName)
 
size_t taylor_close (const char *tay_fileName)
 
void taylor_back (size_t taylorBufferSize, short tapeId, const char *tay_fileName)
 
void write_taylor (double *taylorCoefficientPos, std::ptrdiff_t keep, const char *tay_fileName)
 
void write_scaylor (double val, const char *tay_fileName)
 
void write_taylors (double *taylorCoefficientPos, int keep, int degree, int numDir, const char *tay_fileName)
 
void get_taylors (double *taylorCoefficients, std::ptrdiff_t degree, size_t taylorBufferSize)
 
void get_taylors_p (double *taylorCoefficients, int degree, int numDir, size_t taylorBufferSize)
 

Public Attributes

ADOLC::detail::OpBuffer opBuffer_ {}
 
ADOLC::detail::ValBuffer valBuffer_ {}
 
ADOLC::detail::LocBuffer locBuffer_ {}
 
ADOLC::detail::TayBuffer tayBuffer_ {}
 
size_t numInds {0}
 
size_t numDeps {0}
 
int keepTaylors {0}
 
size_t num_eq_prod {0}
 
int deg_save {0}
 
size_t tay_numInds {0}
 
size_t tay_numDeps {0}
 
size_t numSwitches {0}
 
bool nestedReverseEval {false}
 
size_t nextBufferNumber {0}
 
char lastTayBlockInCore {0}
 
double * signature {nullptr}
 
double * paramstore {nullptr}
 

Static Public Attributes

static constexpr StatEntries OP_BUFFER_SIZE = TapeInfos::OP_BUFFER_SIZE
 
static constexpr StatEntries NUM_OPERATIONS = TapeInfos::NUM_OPERATIONS
 
static constexpr StatEntries OP_FILE_ACCESS = TapeInfos::OP_FILE_ACCESS
 
static constexpr StatEntries LOC_BUFFER_SIZE = TapeInfos::LOC_BUFFER_SIZE
 
static constexpr StatEntries NUM_LOCATIONS = TapeInfos::NUM_LOCATIONS
 
static constexpr StatEntries LOC_FILE_ACCESS = TapeInfos::LOC_FILE_ACCESS
 
static constexpr StatEntries VAL_BUFFER_SIZE = TapeInfos::VAL_BUFFER_SIZE
 
static constexpr StatEntries NUM_VALUES = TapeInfos::NUM_VALUES
 
static constexpr StatEntries VAL_FILE_ACCESS = TapeInfos::VAL_FILE_ACCESS
 
static constexpr StatEntries TAY_BUFFER_SIZE = TapeInfos::TAY_BUFFER_SIZE
 
static constexpr StatEntries NUM_TAYS = TapeInfos::NUM_TAYS
 

Detailed Description

Per-sweep state used while evaluating a recorded tape.

In exclusive mode the context temporarily owns the recording buffers and returns them when the sweep ends. In shared mode it initially views those buffers and allocates private storage lazily when a sweep must overwrite data.

Member Typedef Documentation

◆ StatEntries

Constructor & Destructor Documentation

◆ ~TapeEvaluationContext()

ADOLC::detail::TapeEvaluationContext::~TapeEvaluationContext ( )
inline

◆ TapeEvaluationContext() [1/5]

ADOLC::detail::TapeEvaluationContext::TapeEvaluationContext ( )
delete

◆ TapeEvaluationContext() [2/5]

ADOLC::detail::TapeEvaluationContext::TapeEvaluationContext ( const TapeRecordingContext &  tapeCtx,
TapeInfos::StatArray  stats,
std::shared_lock< std::shared_mutex > &&  lock,
std::shared_lock< std::shared_mutex > &&  dataAccessLock 
)
inlineexplicit

◆ TapeEvaluationContext() [3/5]

ADOLC::detail::TapeEvaluationContext::TapeEvaluationContext ( TapeRecordingContext &&  other,
std::unique_lock< std::shared_mutex > &&  lock,
std::shared_lock< std::shared_mutex > &&  dataAccessLock 
)
inlineexplicitnoexcept

◆ TapeEvaluationContext() [4/5]

ADOLC::detail::TapeEvaluationContext::TapeEvaluationContext ( const TapeEvaluationContext &  )
delete

◆ TapeEvaluationContext() [5/5]

ADOLC::detail::TapeEvaluationContext::TapeEvaluationContext ( TapeEvaluationContext &&  other)
inlinenoexcept

Member Function Documentation

◆ closeSweepFiles()

void ADOLC::detail::TapeEvaluationContext::closeSweepFiles ( )
inline

◆ discard_params_r()

void ADOLC::detail::TapeEvaluationContext::discard_params_r ( size_t  valueBufferSize,
size_t  numParam 
)

◆ finish_tay_file()

void ADOLC::detail::TapeEvaluationContext::finish_tay_file ( const char *  tay_fileName)
inline

◆ get_taylors()

void ADOLC::detail::TapeEvaluationContext::get_taylors ( double *  taylorCoefficients,
std::ptrdiff_t  degree,
size_t  taylorBufferSize 
)

◆ get_taylors_p()

void ADOLC::detail::TapeEvaluationContext::get_taylors_p ( double *  taylorCoefficients,
int  degree,
int  numDir,
size_t  taylorBufferSize 
)

◆ get_val_v_f()

double * ADOLC::detail::TapeEvaluationContext::get_val_v_f ( size_t  size)
inline

◆ get_val_v_r()

double * ADOLC::detail::TapeEvaluationContext::get_val_v_r ( size_t  size)
inline

◆ loadBlockIntoBuffer()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
void ADOLC::detail::TapeEvaluationContext::loadBlockIntoBuffer ( size_t  blockSize)
inline

◆ loadBlockIntoBufferForward()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
void ADOLC::detail::TapeEvaluationContext::loadBlockIntoBufferForward ( size_t  bufferSize)
inline

◆ loadBlockIntoBufferReverse()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
void ADOLC::detail::TapeEvaluationContext::loadBlockIntoBufferReverse ( size_t  blockSize)
inline

◆ loadNextForward()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
Info::value_type ADOLC::detail::TapeEvaluationContext::loadNextForward ( )
inline

◆ loadNextReverse()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
Info::value_type ADOLC::detail::TapeEvaluationContext::loadNextReverse ( size_t  blockSize)
inline

◆ openFile()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
void ADOLC::detail::TapeEvaluationContext::openFile ( const char *  fileName)
inline

◆ operator=() [1/2]

TapeEvaluationContext & ADOLC::detail::TapeEvaluationContext::operator= ( const TapeEvaluationContext &  )
delete

◆ operator=() [2/2]

TapeEvaluationContext & ADOLC::detail::TapeEvaluationContext::operator= ( TapeEvaluationContext &&  other)
deletenoexcept

◆ put_block()

template<InfoType< TapeEvaluationContext, ErrorType > Info>
void ADOLC::detail::TapeEvaluationContext::put_block ( const char *  fileName,
size_t  lengthBlock 
)
inline

◆ releaseTo()

void ADOLC::detail::TapeEvaluationContext::releaseTo ( TapeRecordingContext &  recordCtx)
inline

◆ reset_val_r()

void ADOLC::detail::TapeEvaluationContext::reset_val_r ( size_t  valueBufferSize)
inline

◆ taylor_back()

void ADOLC::detail::TapeEvaluationContext::taylor_back ( size_t  taylorBufferSize,
short  tapeId,
const char *  tay_fileName 
)

◆ taylor_begin()

void ADOLC::detail::TapeEvaluationContext::taylor_begin ( int  degreeSave,
size_t  taylorBufferSize,
const char *  tay_fileName 
)
inline

◆ taylor_close()

size_t ADOLC::detail::TapeEvaluationContext::taylor_close ( const char *  tay_fileName)
inline

◆ write_scaylor()

void ADOLC::detail::TapeEvaluationContext::write_scaylor ( double  val,
const char *  tay_fileName 
)
inline

◆ write_taylor()

void ADOLC::detail::TapeEvaluationContext::write_taylor ( double *  taylorCoefficientPos,
std::ptrdiff_t  keep,
const char *  tay_fileName 
)

◆ write_taylors()

void ADOLC::detail::TapeEvaluationContext::write_taylors ( double *  taylorCoefficientPos,
int  keep,
int  degree,
int  numDir,
const char *  tay_fileName 
)
inline

Member Data Documentation

◆ deg_save

int ADOLC::detail::TapeEvaluationContext::deg_save {0}

◆ keepTaylors

int ADOLC::detail::TapeEvaluationContext::keepTaylors {0}

◆ lastTayBlockInCore

char ADOLC::detail::TapeEvaluationContext::lastTayBlockInCore {0}

◆ LOC_BUFFER_SIZE

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::LOC_BUFFER_SIZE = TapeInfos::LOC_BUFFER_SIZE
staticconstexpr

◆ LOC_FILE_ACCESS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::LOC_FILE_ACCESS = TapeInfos::LOC_FILE_ACCESS
staticconstexpr

◆ locBuffer_

ADOLC::detail::LocBuffer ADOLC::detail::TapeEvaluationContext::locBuffer_ {}

◆ nestedReverseEval

bool ADOLC::detail::TapeEvaluationContext::nestedReverseEval {false}

◆ nextBufferNumber

size_t ADOLC::detail::TapeEvaluationContext::nextBufferNumber {0}

◆ num_eq_prod

size_t ADOLC::detail::TapeEvaluationContext::num_eq_prod {0}

◆ NUM_LOCATIONS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::NUM_LOCATIONS = TapeInfos::NUM_LOCATIONS
staticconstexpr

◆ NUM_OPERATIONS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::NUM_OPERATIONS = TapeInfos::NUM_OPERATIONS
staticconstexpr

◆ NUM_TAYS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::NUM_TAYS = TapeInfos::NUM_TAYS
staticconstexpr

◆ NUM_VALUES

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::NUM_VALUES = TapeInfos::NUM_VALUES
staticconstexpr

◆ numDeps

size_t ADOLC::detail::TapeEvaluationContext::numDeps {0}

◆ numInds

size_t ADOLC::detail::TapeEvaluationContext::numInds {0}

◆ numSwitches

size_t ADOLC::detail::TapeEvaluationContext::numSwitches {0}

◆ OP_BUFFER_SIZE

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::OP_BUFFER_SIZE = TapeInfos::OP_BUFFER_SIZE
staticconstexpr

◆ OP_FILE_ACCESS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::OP_FILE_ACCESS = TapeInfos::OP_FILE_ACCESS
staticconstexpr

◆ opBuffer_

ADOLC::detail::OpBuffer ADOLC::detail::TapeEvaluationContext::opBuffer_ {}

◆ paramstore

double* ADOLC::detail::TapeEvaluationContext::paramstore {nullptr}

◆ signature

double* ADOLC::detail::TapeEvaluationContext::signature {nullptr}

◆ TAY_BUFFER_SIZE

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::TAY_BUFFER_SIZE = TapeInfos::TAY_BUFFER_SIZE
staticconstexpr

◆ tay_numDeps

size_t ADOLC::detail::TapeEvaluationContext::tay_numDeps {0}

◆ tay_numInds

size_t ADOLC::detail::TapeEvaluationContext::tay_numInds {0}

◆ tayBuffer_

ADOLC::detail::TayBuffer ADOLC::detail::TapeEvaluationContext::tayBuffer_ {}

◆ VAL_BUFFER_SIZE

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::VAL_BUFFER_SIZE = TapeInfos::VAL_BUFFER_SIZE
staticconstexpr

◆ VAL_FILE_ACCESS

constexpr StatEntries ADOLC::detail::TapeEvaluationContext::VAL_FILE_ACCESS = TapeInfos::VAL_FILE_ACCESS
staticconstexpr

◆ valBuffer_

ADOLC::detail::ValBuffer ADOLC::detail::TapeEvaluationContext::valBuffer_ {}

The documentation for this struct was generated from the following file: