MCPcopy Create free account
hub / github.com/coin-or/CppAD / debug_thread_alloc

Function debug_thread_alloc

test_more/debug_rel/debug.cpp:9–15  ·  view source on GitHub ↗

checks that d_ptr points to a double with value 5.0 and then frees the double using thread_alloc::return_memory

Source from the content-addressed store, hash-verified

7// checks that d_ptr points to a double with value 5.0 and then
8// frees the double using thread_alloc::return_memory
9bool debug_thread_alloc(double *d_ptr)
10{ bool ok = true;
11 ok &= ( *d_ptr == 5.0);
12 void* v_ptr = reinterpret_cast<void*>(d_ptr);
13 CppAD::thread_alloc::return_memory(v_ptr);
14 return ok;
15}
16
17// just use ADFun<double> constructor
18void debug_adfun_ctor(void)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected