CMSIS-DSP  
CMSIS DSP Software Library
 
Loading...
Searching...
No Matches
Tape< T > Class Template Reference

Public Member Functions

template<typename Operator>
bool register_operator () noexcept
 Register an operator type once. Registration uses no arena storage.
 
void reset () noexcept
 
void begin_graph () noexcept
 
bool rewind_graph () noexcept
 Reclaim only operation records, preserving views and their gradients.
 
BufferView< T > view (T *values, std::size_t length) noexcept
 Generic active view; output() is clearer for application code.
 

Description

template<typename T>
class arm_cmsis_dsp::autodiff::Tape< T >

Reverse-mode tape using caller-supplied storage and a fixed operator list.

Examples
autodiff_example/Iris/main.cpp.

Member Function Documentation

◆ begin_graph()

template<typename T>
void begin_graph ( )
inlinenoexcept

Mark all current arena allocations as persistent training state.

Examples
autodiff_example/Iris/main.cpp.

◆ register_operator()

template<typename T>
template<typename Operator>
bool register_operator ( )
inlinenoexcept

Register an operator type once. Registration uses no arena storage.

Template Parameters
OperatorOperator type to register.
Returns
True if registered or already present; false if the registry is full.
Examples
autodiff_example/Iris/main.cpp.

◆ reset()

template<typename T>
void reset ( )
inlinenoexcept

Release gradients and records. Operator registrations are preserved.

◆ rewind_graph()

template<typename T>
bool rewind_graph ( )
inlinenoexcept

Reclaim only operation records, preserving views and their gradients.

Returns
True on success; false if begin_graph() has not marked the graph.
Examples
autodiff_example/Iris/main.cpp.

◆ view()

template<typename T>
BufferView< T > view ( T * values,
std::size_t length )
inlinenoexcept

Generic active view; output() is clearer for application code.

Parameters
valuesCaller-owned value buffer, which must outlive the view.
lengthNumber of values and gradient elements.
Returns
Intermediate buffer view with zero-initialized gradients allocated from the tape. On failure, the view has no gradient buffer and the tape status records the error.