CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
static thread_alloc_info* CppAD::thread_alloc::thread_info ( size_t  thread,
bool  clear = false 

Get pointer to the information for this thread.

thread[in] Is the thread number for this information pointer.
clearIf clear is true, then the information pointer for this thread is deleted and the CPPAD_NULL pointer is returned. There must be no memory currently in either the inuse or avaialble lists when this routine is called.
is the current informaiton pointer for this thread. If clear is false, and the current pointer is CPPAD_NULL, a new infromation record is allocated and its pointer returned. In this case, if info is the retured pointer, info->count_inuse == 0 and info->count_available == 0. In addition, for c = 0 , ... , CPPAD_MAX_NUM_CAPACITY-1 info->root_inuse_[c].next_ == CPPAD_NULL and info->root_available_[c].next_ == CPPAD_NULL.

Definition at line 194 of file thread_alloc.hpp.

Referenced by available(), dec_available(), dec_inuse(), free_available(), get_memory(), inc_available(), inc_inuse(), inuse(), parallel_setup(), and return_memory().