CppAD: A C++ Algorithmic Differentiation Package  20130918
template<class Base >
ADTape< Base > * CppAD::AD< Base >::tape_manage ( tape_manage_job  job) [static, private]

Create and delete tapes that record AD<Base> operations for current thread.

thread
the current thread is given by
Template Parameters:
Baseis the base type corresponding to AD<Base> operations.
Parameters:
jobThis argument determines if we are creating a new tape, or deleting an old one.
  • tape_manage_new : Creates and a new tape. It is assumed that there is no tape recording AD<Base> operations for this thread when tape_manage is called. It the input value of *tape_id_handle(thread) is CPPAD_NULL, it will be changed to a non-zero pointer and the corresponding value of *tape_id_ptr(thread) will be set to thread + CPPAD_MAX_NUM_THREADS.
  • tape_manage_delete : It is assumed that there is a tape recording AD<Base> operations for this thread when tape_manage is called. The value of *tape_id_ptr(thread) will be advanced by CPPAD_MAX_NUM_THREADS.
Returns:
  • job == tape_manage_new: a pointer to the new tape is returned.
  • job == tape_manage_delete: the value CPPAD_NULL is returned.

Definition at line 211 of file tape_link.hpp.

Referenced by CppAD::AD< Base >::abort_recording(), CppAD::ADFun< Base >::Dependent(), and CppAD::parallel_ad().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines