1#ifndef ADOLC_TAPE_REGISTRY_H
2#define ADOLC_TAPE_REGISTRY_H
47 thread_local std::vector<RecordingFrame> cTStack{
RecordingFrame{}};
100 thread_local ValueTape *currTapePtr =
nullptr;
#define ADOLC_API
Definition adolcexport.h:16
Owns one recorded function and the state required to evaluate it.
Definition valuetape.h:79
One entry in the thread-local stack of nested recordings.
Definition taperegistry.h:19
ValueTape * prev
Definition taperegistry.h:20
ValueTape * current
Definition taperegistry.h:21
ADOLC_API ValueTape * findTapePtr_(short tapeId)
Attempts to find a ValueTape pointer by tapeId without triggering an error.
ValueTape & currentTape()
Returns a reference to the current ValueTape.
Definition taperegistry.h:113
ADOLC_API ValueTape & findTape(short tapeId)
Returns a reference to a ValueTape by tapeId, or throws an error if not found.
ADOLC_API ValueTape *& currentTapePtr()
Returns a thread-local reference to the pointer to the current ValueTape.
Definition taperegistry.h:99
ADOLC_API ValueTape * findTapePtr(short tapeId)
Returns a pointer to a ValueTape by tape ID, or throws an error if not found.
ADOLC_API short createNewTape()
Creates a new tape and returns its ID.
void setCurrentTape(ValueTape *tape) noexcept
Sets the current tape pointer to the given tape.
Definition taperegistry.h:123
std::vector< RecordingFrame > & currentTapeStack()
Returns a thread-local stack holding pointers to ValueTape instances.
Definition taperegistry.h:46
ADOLC_API std::vector< std::unique_ptr< ValueTape > > & tapeBuffer()
Returns the process-wide vector that owns all ValueTape instances.