checks that d_ptr points to a double with value 5.0 and then frees the double using thread_alloc::return_memory
| 7 | // checks that d_ptr points to a double with value 5.0 and then |
| 8 | // frees the double using thread_alloc::return_memory |
| 9 | bool 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 |
| 18 | void debug_adfun_ctor(void) |