Prev Next omp_return_memory

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
Return Memory to omp_alloc

Deprecated 2011-08-31
Use the function thread_alloc::return_memory instead.

Syntax
# include <cppad/utility/omp_alloc.hpp>
omp_alloc::return_memory(v_ptr)

Purpose
If omp_max_num_threads is one, the memory is returned to the system. Otherwise, the memory is retained by omp_alloc for quick future use by the thread that allocated to memory.

v_ptr
This argument has prototype
     void* 
v_ptr
. It must be a pointer to memory that is currently in use; i.e. obtained by a previous call to omp_get_memory and not yet returned.

Thread
Either the current thread must be the same as during the corresponding call to omp_get_memory , or the current execution mode must be sequential (not parallel ).

NDEBUG
If NDEBUG is defined, v_ptr is not checked (this is faster). Otherwise, a list of in use pointers is searched to make sure that v_ptr is in the list.

Example
omp_alloc.cpp
Input File: cppad/utility/omp_alloc.hpp