Create a new tape that records AD<Base> operations for current thread.
- Template Parameters:
-
Base | is the base type corresponding to AD<Base> operations. |
- thread
- Let
thread
denote the current OpenMP thread number omp_get_thread_num()
. If _OPENMP
is not defined, thread
is zero. It is a user error if thread >= AD<Base>::omp_max_thread(0)
.
- tape_handle
- It is assumed that
*tape_handle(thread) == CPPAD_NULL
when tape_new
is called. Upon return *tape_handle(thread)
is a pointer to the new ADTape<Base> tape that was created.
- tape_id
- We use
id
to denote AD<Base>::tape_id(thread)
. If *id
is zero when tape_new
is called, a new value is chosen by tape_new
. Otherwise, *id
is not modified.
- Returns:
- The return value
id
is the identifier for the new tape and satisfies the following conditions:
id > CPPAD_MAX_NUM_THREADS
thread = id % CPPAD_MAX_NUM_THREADS
- Each call to
tape_new
returns a different value id
.
Definition at line 213 of file tape_link.hpp.