Analytics Template Library
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
atl::Tape< REAL_T > Class Template Reference

#include <Tape.hpp>

Public Member Functions

 Tape (size_t size=100000)
 
size_t GetBlock (size_t size)
 
const size_t NextIndex ()
 
void Accumulate ()
 
 Tape (size_t size=10000000)
 
size_t GetBlock (size_t size)
 
const size_t NextIndex ()
 
REAL_T & Reference (uint32_t i)
 
REAL_T & Reference (uint32_t i, uint32_t j)
 
REAL_T & Reference (uint32_t i, uint32_t j, uint32_t k)
 
const REAL_T Value (uint32_t i)
 
const REAL_T Value (uint32_t i, uint32_t j)
 
const REAL_T Value (uint32_t i, uint32_t j, uint32_t k)
 
void Accumulate ()
 
void AccumulateFirstOrder ()
 
void AccumulateSecondOrder ()
 
void AccumulateThirdOrder ()
 

Public Attributes

std::unordered_map< uint32_t,
REAL_T > 
first_order_derivtives
 
std::vector< StackEntry
< REAL_T >, atl::clfallocator
< StackEntry< REAL_T > > > 
stack
 
std::atomic< size_t > stack_current
 
bool recording = true
 
DerivativeTraceLevel derivative_trace_level = FIRST_ORDER_REVERSE
 
first_order_container first_order_derivatives
 
second_order_container second_order_derivatives
 
third_order_container third_order_derivatives
 
std::unordered_map< uint32_t,
ForwardModeDerivativeInfo
< REAL_T > > 
forward_mode_derivative_info
 

Detailed Description

template<typename REAL_T>
class atl::Tape< REAL_T >

Tape class for recording adjoint derivative information that will be used in reverse mode accumulation upt to third-order.

Constructor & Destructor Documentation

template<typename REAL_T>
atl::Tape< REAL_T >::Tape ( size_t  size = 10000000)
inline

Constructor.

Reserves memory for the tape to size.

Parameters
size

Member Function Documentation

template<typename REAL_T>
void atl::Tape< REAL_T >::Accumulate ( )
inline

Accumulates reverse mode derivatives according to derivative_trace_level.

template<typename REAL_T>
size_t atl::Tape< REAL_T >::GetBlock ( size_t  size)
inline

Atomic operation.

Allocates a block of tape entries. Adds size to the stack_current member. Useful for concurrent container operations.

Parameters
size
Returns
template<typename REAL_T>
const size_t atl::Tape< REAL_T >::NextIndex ( )
inline

Atomic operation. Gets the next available index in the stack.

Returns

Referenced by atl::Variable< T >::Assign().

template<typename REAL_T>
const size_t atl::Tape< REAL_T >::NextIndex ( )
inline

Atomic operation. Gets the next available index in the stack.

Returns

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