CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Base >
size_t * AD< Base >::id_handle ( size_t  thread) [inline, static, private]

Get the identifier for the tape that records AD<Base> operations for the specified thread.

Template Parameters:
Baseis the base type corresponding to AD<Base> operations.
Parameters:
threadis the index that identifes the current OpenMP thread. 0 <= thread < omp_max_thread(0).
Returns:
The return value r is a pointer to the tape identifier for the current thread. It can be used to get or set the value of *r and any such setting should abide by the following rules:
  • Only the routines AD<Base>::tape_new and AD<Base>::tape_delete change the value of *r.
  • If *r == 0, there is no tape currently recording for this thread.
  • If *r != 0, there current is a tape recording for this thread. Furthermore the identifier satisfies the conditions *r > CPPAD_MAX_NUM_THREADS , and *r % CPPAD_MAX_NUM_THREADS == thread.
  • The value of *r must increase each time it is changed.

Definition at line 65 of file tape_link.hpp.