Prev Next omp_get_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}} }@)@ This is cppad-20221105 documentation. Here is a link to its current documentation .
Get At Least A Specified Amount of Memory

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

Syntax
# include <cppad/utility/omp_alloc.hpp>
v_ptr = omp_alloc::get_memory(min_bytescap_bytes)

Purpose
Use omp_alloc to obtain a minimum number of bytes of memory (for use by the current thread ).

min_bytes
This argument has prototype
    size_t 
min_bytes
It specifies the minimum number of bytes to allocate.

cap_bytes
This argument has prototype
    size_t& 
cap_bytes
It's input value does not matter. Upon return, it is the actual number of bytes (capacity) that have been allocated for use,
    
min_bytes <= cap_bytes

v_ptr
The return value v_ptr has prototype
    void* 
v_ptr
It is the location where the cap_bytes of memory that have been allocated for use begins.

Allocation Speed
This allocation should be faster if the following conditions hold:
  1. The memory allocated by a previous call to get_memory is currently available for use.
  2. The current min_bytes is between the previous min_bytes and previous cap_bytes .

Input File: include/cppad/utility/omp_alloc.hpp