Prev | Next | omp_efficient |
# include <cppad/utility/omp_alloc.hpp>
flag = omp_alloc::efficient(v_ptr, num_bytes)
const 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.
size_t num_bytes
It specifies the number of bytes of the memory allocated by
v_ptr
that we want to use.
bool flag
It is true,
a call to get_memory
with
min_bytes
equal to
num_bytes
would result in a value for
cap_bytes
that is the same as when v_ptr
was returned by get_memory
; i.e.,
v_ptr
is an efficient memory block for
num_bytes
bytes of information.
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.