CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::EventSystem< T_Tape > Struct Template Reference

Full EventSystem implementation for reverse tapes. More...

#include <eventSystem.hpp>

Inheritance diagram for codi::EventSystem< T_Tape >:

Public Types

using Base = EventSystemBase<Tape>
 Base class abbreviation.
 
using Event = typename Base::Event
 See EventSystemBase.
 
using Gradient = typename Tape::Gradient
 Gradient type used by the tape.
 
using Handle = typename Base::Handle
 See EventSystemBase.
 
using Identifier = typename Tape::Identifier
 Identifier type used by the tape.
 
using Index = typename Tape::Identifier
 Index type used by the tape.
 
using Position = typename Tape::Position
 
using Real = typename Tape::Real
 Floating point type the tape is based on.
 
using Tape = T_Tape
 See EventSystem.
 
using VectorAccess = VectorAccessInterface<Real, Identifier>
 Vector access interface that is compatible with the Tape.
 
- Public Types inherited from codi::EventSystemBase< T_Tape >
using Handle = size_t
 Handle that identifies a registered callback.
 
using Identifier = typename Tape::Identifier
 Identifier type used by the tape.
 
using Real = typename Tape::Real
 Floating point type the tape is based on.
 
using Tape = T_Tape
 See EventSystemBase.
 

Static Public Member Functions

AD workflow events
static Handle registerTapeStartRecordingListener (void(*callback)(Tape &, void *), void *customData=nullptr)
 Register callbacks for TapeStartRecording events.
 
static void notifyTapeStartRecordingListeners (Tape &tape)
 Invoke callbacks for TapeStartRecording events.
 
static Handle registerTapeStopRecordingListener (void(*callback)(Tape &, void *), void *customData=nullptr)
 Register callbacks for TapeStopRecording events.
 
static void notifyTapeStopRecordingListeners (Tape &tape)
 Invoke callbacks for TapeStopRecording events.
 
static Handle registerTapeRegisterInputListener (void(*callback)(Tape &, Real &, Identifier &, void *), void *customData=nullptr)
 Register callbacks for TapeRegisterInput events.
 
static void notifyTapeRegisterInputListeners (Tape &tape, Real &value, Identifier &identifier)
 Invoke callbacks for TapeRegisterInput events.
 
static Handle registerTapeRegisterOutputListener (void(*callback)(Tape &, Real &, Identifier &, void *), void *customData=nullptr)
 Register callbacks for TapeRegisterOutput events.
 
static void notifyTapeRegisterOutputListeners (Tape &tape, Real &value, Identifier &identifier)
 Invoke callbacks for TapeRegisterOutput events.
 
static Handle registerTapeEvaluateListener (void(*callback)(Tape &, Position const &, Position const &, VectorAccess *, EventHints::EvaluationKind, EventHints::Endpoint, void *), void *customData=nullptr)
 Register callbacks for TapeEvaluate events.
 
static void notifyTapeEvaluateListeners (Tape &tape, Position const &start, Position const &end, VectorAccess *adjoint, EventHints::EvaluationKind evalKind, EventHints::Endpoint endpoint)
 Invoke callbacks for TapeEvaluate events.
 
static Handle registerTapeResetListener (void(*callback)(Tape &, Position const &, EventHints::Reset, bool, void *), void *customData=nullptr)
 Register callbacks for TapeReset events.
 
static void notifyTapeResetListeners (Tape &tape, Position const &position, EventHints::Reset kind, bool clearAdjoints)
 Invoke callbacks for TapeReset events.
 
Preaccumulation events
static Handle registerPreaccStartListener (void(*callback)(Tape &, void *), void *customData=nullptr)
 Register callbacks for PreaccStart events.
 
static void notifyPreaccStartListeners (Tape &tape)
 Invoke callbacks for PreaccStart events.
 
static Handle registerPreaccFinishListener (void(*callback)(Tape &, void *), void *customData=nullptr)
 Register callbacks for PreaccFinish events.
 
static void notifyPreaccFinishListeners (Tape &tape)
 Invoke callbacks for PreaccFinish events.
 
static Handle registerPreaccAddInputListener (void(*callback)(Tape &, Real const &, Identifier const &, void *), void *customData=nullptr)
 Register callbacks for PreaccAddInput events.
 
static void notifyPreaccAddInputListeners (Tape &tape, Real const &value, Identifier const &identifier)
 Invoke callbacks for PreaccAddInput events.
 
static Handle registerPreaccAddOutputListener (void(*callback)(Tape &, Real &, Identifier &, void *), void *customData=nullptr)
 Register callbacks for PreaccAddOutput events.
 
static void notifyPreaccAddOutputListeners (Tape &tape, Real &value, Identifier &identifier)
 Invoke callbacks for PreaccAddOutput events.
 
Statement events
static Handle registerStatementStoreOnTapeListener (void(*callback)(Tape &, Identifier const &, Real const &, size_t, Identifier const *, Real const *, void *), void *customData=nullptr)
 Register callbacks for StatementStoreOnTape events.
 
static void notifyStatementStoreOnTapeListeners (Tape &tape, Identifier const &lhsIdentifier, Real const &newValue, size_t numActiveVariables, Identifier const *rhsIdentifiers, Real const *jacobians)
 Invoke callbacks for StatementStoreOnTape events.
 
static Handle registerStatementEvaluateListener (void(*callback)(Tape &, Identifier const &, size_t, Real const *, void *), void *customData=nullptr)
 Register callbacks for StatementEvaluate events.
 
static void notifyStatementEvaluateListeners (Tape &tape, Identifier const &lhsIdentifier, size_t sizeLhsAdjoint, Real const *lhsAdjoint)
 Invoke callbacks for StatementEvaluate events.
 
static Handle registerStatementEvaluatePrimalListener (void(*callback)(Tape &, Identifier const &, Real const &, void *), void *customData=nullptr)
 Register callbacks for StatementEvaluatePrimal events.
 
static void notifyStatementEvaluatePrimalListeners (Tape &tape, Identifier const &lhsIdentifier, Real const &lhsValue)
 Invoke callbacks for StatementEvaluatePrimal events.
 
Index handling events
static Handle registerIndexAssignListener (void(*callback)(Index const &, void *), void *customData=nullptr)
 Register callbacks for IndexAssign events.
 
static void notifyIndexAssignListeners (Index const &index)
 Invoke callbacks for IndexAssign events.
 
static Handle registerIndexFreeListener (void(*callback)(Index const &, void *), void *customData=nullptr)
 Register callbacks for IndexFree events.
 
static void notifyIndexFreeListeners (Index const &index)
 Invoke callbacks for IndexFree events.
 
static Handle registerIndexCopyListener (void(*callback)(Index const &, void *), void *customData=nullptr)
 Register callbacks for IndexCopy events.
 
static void notifyIndexCopyListeners (Index const &index)
 Invoke callbacks for IndexCopy events.
 
- Static Public Member Functions inherited from codi::EventSystemBase< T_Tape >
static Handle registerStatementPrimalListener (void(*callback)(Tape &, Real const &, Identifier const &, Real const &, EventHints::Statement, void *), void *customData=nullptr)
 Register callbacks for StatementPrimal events.
 
static void notifyStatementPrimalListeners (Tape &tape, Real const &lhsValue, Identifier const &lhsIdentifier, Real const &newValue, EventHints::Statement statement)
 Invoke callbacks for StatementPrimal events.
 
static void notifyStatementPrimalListeners (Tape &&tape, Real const &lhsValue, Identifier const &lhsIdentifier, Real const &newValue, EventHints::Statement statement)
 Invoke callbacks for StatementPrimal events.
 
static void deregisterListener (Handle const &handle)
 Deregister a listener.
 

Additional Inherited Members

- Protected Types inherited from codi::EventSystemBase< T_Tape >
using Callback = void*
 
enum class  Event {
  TapeStartRecording , TapeStopRecording , TapeRegisterInput , TapeRegisterOutput ,
  TapeEvaluate , TapeReset , PreaccStart , PreaccFinish ,
  PreaccAddInput , PreaccAddOutput , StatementPrimal , StatementStoreOnTape ,
  StatementEvaluate , StatementEvaluatePrimal , IndexCreate , IndexAssign ,
  IndexFree , IndexCopy , Count
}
 Full set of events.
 
using EventListenerMap = std::map<Event, std::list<std::pair<Handle, std::pair<Callback, void*>>>>
 Map that links events to registered callbacks and their associated custom data.
 
- Static Protected Member Functions inherited from codi::EventSystemBase< T_Tape >
static EventListenerMapgetListeners ()
 Access the static EventListenerMap.
 
template<typename TypedCallback , typename... Args>
static void internalNotifyListeners (bool const enabled, Event event, Args &&... args)
 Internal method for callback invocation.
 
template<typename TypedCallback >
static Handle internalRegisterListener (bool const enabled, Event event, TypedCallback callback, void *customData)
 Internal method for callback registration.
 

Detailed Description

template<typename T_Tape>
struct codi::EventSystem< T_Tape >

Full EventSystem implementation for reverse tapes.

See EventSystemBase for a general description of the event system.

This class implements methods for all of the remaining events.

Template Parameters
T_TapeTape type associated with the event system.

Member Typedef Documentation

◆ Position

template<typename T_Tape >
using codi::EventSystem< T_Tape >::Position = typename Tape::Position

Position used by the tape.

Member Function Documentation

◆ notifyIndexAssignListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyIndexAssignListeners ( Index const & index)
inlinestatic

Invoke callbacks for IndexAssign events.

IndexAssign events occur when an index management assigns an index to a left hand side variable. This includes cases where an index is left in place, in the sense that it is freed and immediately assigned again. It is unspecified whether the event occurs before or after the actual index assignment.

Parameters
indexThe assigned index.

◆ notifyIndexCopyListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyIndexCopyListeners ( Index const & index)
inlinestatic

Invoke callbacks for IndexCopy events.

IndexCopy events occur when an index management assigns an index to a left hand side variable by copying it from the right hand side variable. It is unspecified whether the event occurs before or after the actual index copy operation.

Parameters
indexThe copied index.

◆ notifyIndexFreeListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyIndexFreeListeners ( Index const & index)
inlinestatic

Invoke callbacks for IndexFree events.

IndexFree events occur when an index management frees an index of a left hand side variable. This includes cases where an existing index is overwritten by a new one, and cases where an index is left in place (in the sense that it is freed and immediately assigned again). It is unspecified whether the event occurs before or after the actual index free operation.

Parameters
indexThe freed index.

◆ notifyPreaccAddInputListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyPreaccAddInputListeners ( Tape & tape,
Real const & value,
Identifier const & identifier )
inlinestatic

Invoke callbacks for PreaccAddInput events.

A PreaccAddInput event occurs when an input is added via a PreaccumulationHelper, e.g., by passing them to start or by calling addInput. The event occurs before the internal registration.

Parameters
tapeReference to the tape.
valueThe value of the input that is registered.
identifierThe identifier of the input that is registered.

◆ notifyPreaccAddOutputListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyPreaccAddOutputListeners ( Tape & tape,
Real & value,
Identifier & identifier )
inlinestatic

Invoke callbacks for PreaccAddOutput events.

A PreaccAddOutput event occurs when an output is added via a PreaccumulationHelper, e.g., by passing them to finish or by calling addOutput. The event occurs before the internal registration.

Parameters
tapeReference to the tape.
valueThe value of the output that is registered.
identifierThe identifier of the output that is registered.

◆ notifyPreaccFinishListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyPreaccFinishListeners ( Tape & tape)
inlinestatic

Invoke callbacks for PreaccFinish events.

A PreaccFinish event occurs whenever a preaccumulation is finished via a PreaccumulationHelper, after everything related to the preaccumulation is completed. Note that there may be TapeEvaluate, TapeReset, and StatementStore events due to preaccumulation after the call to finish but before this event.

Parameters
tapeReference to the tape.

◆ notifyPreaccStartListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyPreaccStartListeners ( Tape & tape)
inlinestatic

Invoke callbacks for PreaccStart events.

A PreaccStart event occurs whenever a preaccumulation is started via a PreaccumulationHelper, prior to internal preparations for the preaccumulation.

Parameters
tapeReference to the tape.

◆ notifyStatementEvaluateListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyStatementEvaluateListeners ( Tape & tape,
Identifier const & lhsIdentifier,
size_t sizeLhsAdjoint,
Real const * lhsAdjoint )
inlinestatic

Invoke callbacks for StatementEvaluate events.

A StatementEvaluate occurs whenever a tape evaluates a statement. For forward evaluations, the event occurs after the statement evaluation. For reverse evaluations, the event occurs before statement evaluation and before the left hand side adjoint is zeroed, if applicable.

Parameters
tapeReference to the tape.
lhsIdentifierLeft hand side identifier.
sizeLhsAdjointNumber of left hand side adjoint components.
lhsAdjointPointer to the left hand side adjoint components.

◆ notifyStatementEvaluatePrimalListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyStatementEvaluatePrimalListeners ( Tape & tape,
Identifier const & lhsIdentifier,
Real const & lhsValue )
inlinestatic

Invoke callbacks for StatementEvaluatePrimal events.

A StatementEvaluatePrimal occurs whenever a primal value tape evaluates a statement. For forward and reverse evaluations, it occurs in addition to StatementEvaluate events. Primal tape evaluations produce only StatementEvaluatePrimal events. StatementEvaluatePrimal events occur after StatementEvaluate events. For primal evaluations, they occur after the evaluation of the primal statement.

Parameters
tapeReference to the tape.
lhsIdentifierIdentifier of the left hand side variable.
lhsValueValue of the left hand side variable.

◆ notifyStatementStoreOnTapeListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyStatementStoreOnTapeListeners ( Tape & tape,
Identifier const & lhsIdentifier,
Real const & newValue,
size_t numActiveVariables,
Identifier const * rhsIdentifiers,
Real const * jacobians )
inlinestatic

Invoke callbacks for StatementStoreOnTape events.

A StatementStoreOnTape event occurs whenever a statement is stored on an associated tape. Note that all statements emit StatementPrimal events, but might not be stored on the tape, for example because nothing is active. The event is emitted after storing all data on the tape, after the left hand side has been assigned an identifier, but before the left hand side updates its primal value.

Parameters
tapeReference to the tape.
lhsIdentifierIdentifier assigned to the left hand side.
newValueValue that is assigned to the left hand side.
numActiveVariablesNumber of active variables on the right hand side.
rhsIdentifiersPointer to numActiveVariables identifiers.
jacobiansPointer to numActiveVariables Jacobian values.

◆ notifyTapeEvaluateListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeEvaluateListeners ( Tape & tape,
Position const & start,
Position const & end,
VectorAccess * adjoint,
EventHints::EvaluationKind evalKind,
EventHints::Endpoint endpoint )
inlinestatic

Invoke callbacks for TapeEvaluate events.

TapeEvaluate events occur both prior to and after the evaluation process, with correspondingly different endpoint parameter. The tape evaluation is classified by the evalKind parameter.

Parameters
tapeReference to the tape.
startStarting position of the evaluation.
endEnd position of the evaluation.
adjointVector access interface that provides access to adjoint variables.
evalKindIndicates whether the evaluation is primal, forward, or reverse.
endpointIndicates whether this is the event before or after the tape evaluation.

◆ notifyTapeRegisterInputListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeRegisterInputListeners ( Tape & tape,
Real & value,
Identifier & identifier )
inlinestatic

Invoke callbacks for TapeRegisterInput events.

A TapeRegisterInput event occurs whenever registerInput calls are made to an associated tape, after the internal input registration is completed.

Parameters
tapeReference to the tape.
valueThe value of the input that has been registered.
identifierThe new identifier of the input that has been registered.

◆ notifyTapeRegisterOutputListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeRegisterOutputListeners ( Tape & tape,
Real & value,
Identifier & identifier )
inlinestatic

Invoke callbacks for TapeRegisterOutput events.

A TapeRegisterOutput event occurs whenever registerOutput calls are made to the tape, after the internal output registration is completed.

Parameters
tapeReference to the tape.
valueThe value of the output that has been registered.
identifierThe new identifier of the output that has been registered.

◆ notifyTapeResetListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeResetListeners ( Tape & tape,
Position const & position,
EventHints::Reset kind,
bool clearAdjoints )
inlinestatic

Invoke callbacks for TapeReset events.

A TapeReset event occurs in the course of reset, resetTo, and resetHard calls made to an associated tape, the respective origin is indicated by kind. For Jacobian tapes, the event occurs before any internal reset takes place. For primal value tapes, some internal reset operations have already been performed when the event occurs.

Parameters
tapeReference to the tape.
positionPosition to which we reset, zero position for full and hard resets.
kindReset kind, see codi::EventHints::Reset.
clearAdjointsIndicates whether adjoints are zeroed.

◆ notifyTapeStartRecordingListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeStartRecordingListeners ( Tape & tape)
inlinestatic

Invoke callbacks for TapeStartRecording events.

A TapeStartRecording event is triggered whenever an associated tape is set active. The event occurs before the internal tape status change.

Parameters
tapeReference to the tape.

◆ notifyTapeStopRecordingListeners()

template<typename T_Tape >
static void codi::EventSystem< T_Tape >::notifyTapeStopRecordingListeners ( Tape & tape)
inlinestatic

Invoke callbacks for TapeStopRecording events.

A TapeStopRecording event is triggered whenever an associated type is set passive. The event occurs before the internal tape status change.

Parameters
tapeReference to the tape.

◆ registerIndexAssignListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerIndexAssignListener ( void(*)(Index const &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for IndexAssign events.

See notifyIndexAssignListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerIndexCopyListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerIndexCopyListener ( void(*)(Index const &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for IndexCopy events.

See notifyIndexCopyListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerIndexFreeListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerIndexFreeListener ( void(*)(Index const &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for IndexFree events.

See notifyIndexFreeListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerPreaccAddInputListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerPreaccAddInputListener ( void(*)(Tape &, Real const &, Identifier const &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for PreaccAddInput events.

See notifyPreaccAddInputListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerPreaccAddOutputListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerPreaccAddOutputListener ( void(*)(Tape &, Real &, Identifier &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for PreaccAddOutput events.

See notifyPreaccAddOutputListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerPreaccFinishListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerPreaccFinishListener ( void(*)(Tape &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for PreaccFinish events.

See notifyPreaccFinishListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerPreaccStartListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerPreaccStartListener ( void(*)(Tape &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for PreaccStart events.

See notifyPreaccStartListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerStatementEvaluateListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerStatementEvaluateListener ( void(*)(Tape &, Identifier const &, size_t, Real const *, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for StatementEvaluate events.

See notifyStatementEvaluateListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerStatementEvaluatePrimalListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerStatementEvaluatePrimalListener ( void(*)(Tape &, Identifier const &, Real const &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for StatementEvaluatePrimal events.

See notifyStatementEvaluatePrimalListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerStatementStoreOnTapeListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerStatementStoreOnTapeListener ( void(*)(Tape &, Identifier const &, Real const &, size_t, Identifier const *, Real const *, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for StatementStoreOnTape events.

See notifyStatementStoreOnTapeListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeEvaluateListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeEvaluateListener ( void(*)(Tape &, Position const &, Position const &, VectorAccess *, EventHints::EvaluationKind, EventHints::Endpoint, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeEvaluate events.

See notifyTapeEvaluateListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeRegisterInputListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeRegisterInputListener ( void(*)(Tape &, Real &, Identifier &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeRegisterInput events.

See notifyTapeRegisterInputListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeRegisterOutputListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeRegisterOutputListener ( void(*)(Tape &, Real &, Identifier &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeRegisterOutput events.

See notifyTapeRegisterOutputListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeResetListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeResetListener ( void(*)(Tape &, Position const &, EventHints::Reset, bool, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeReset events.

See notifyTapeResetListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeStartRecordingListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeStartRecordingListener ( void(*)(Tape &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeStartRecording events.

See notifyTapeStartRecordingListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

◆ registerTapeStopRecordingListener()

template<typename T_Tape >
static Handle codi::EventSystem< T_Tape >::registerTapeStopRecordingListener ( void(*)(Tape &, void *) callback,
void * customData = nullptr )
inlinestatic

Register callbacks for TapeStopRecording events.

See notifyTapeStopRecordingListeners for the callback parameters and event order.

Parameters
callbackCallback to be invoked.
customDataOptional. Custom data that should be linked with the callback, otherwise nullptr.

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