CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
static void* CppAD::omp_alloc::get_memory ( size_t  min_bytes,
size_t &  cap_bytes 
)
inlinestatic

Use omp_alloc to get a specified amount of memory.

If the memory allocated by a previous call to get_memory is now avaialable, and min_bytes is between its previous value and the previous cap_bytes, this memory allocation will have optimal speed. Otherwise, the memory allocation is more complicated and may have to wait for other threads to complete an allocation.

Parameters
min_bytes[in] The minimum number of bytes of memory to be obtained for use.
cap_bytes[out] The actual number of bytes of memory obtained for use.
Returns
pointer to the beginning of the memory allocted for use.

Definition at line 275 of file omp_alloc.hpp.