source: trunk/test_more/debug_rel/release.cpp @ 3938

Last change on this file since 3938 was 3938, checked in by bradbell, 2 years ago

merge to branch: trunk
from repository:
start hash code: 78ba7f801a6fec0dbdaa887c01ea58a9ccb59817
end hash code: bd9a72f2ccec67a9773cd2ecd536df8fe09860da

commit bd9a72f2ccec67a9773cd2ecd536df8fe09860da
Author: Brad Bell <bradbell@…>
Date: Mon May 22 06:14:34 2017 -0700

  1. Add the cppad_extra_debug option to cmake command.
  2. Advance to cppad-20170522.

commit 8f832650db029dd1df2f302b3e6a7f39cb83078f
Author: Brad Bell <bradbell@…>
Date: Sun May 21 07:16:35 2017 -0700

CMakeLists.txt: change type of cppad_deprecated to BOOL (must be NO). fix comment about CPPAD_DEPRECATED.
ad_ctor.hpp: remove comment about old use of cppad_deprecated.
cmake.omh: remove description of old deprecated case.

commit 9a0a0705f7c44e5a93c136c3bd1e56ab39bb809f
Author: Brad Bell <bradbell@…>
Date: Sun May 21 06:34:38 2017 -0700

Add test that fails when release.cpp is compiled for release.
CMakeLists.txt: improve command line argument comments.

commit bfbc481d68256d71217a1d9a439bc2b2e07f90c2
Author: Brad Bell <bradbell@…>
Date: Sun May 21 04:15:26 2017 -0700

Advance to cppad-20170521. simplify.

commit 163044ceea186505229e59770b263fe00b12726d
Author: Brad Bell <bradbell@…>
Date: Sat May 20 09:07:15 2017 -0700

Create test_more/debug_rel (Under construction).

commit 9d90a176a0fc75faff28c0cb2034218d8a3b2f6a
Author: Brad Bell <bradbell@…>
Date: Sat May 20 07:04:52 2017 -0700 add link to new directory structure page.

File size: 927 bytes
1/* --------------------------------------------------------------------------
2CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
4CppAD is distributed under multiple licenses. This distribution is under
5the terms of the
6                    Eclipse Public License Version 1.0.
8A copy of this license is included in the COPYING file of this distribution.
9Please visit for information on other licenses.
10-------------------------------------------------------------------------- */
11# include <cppad/cppad.hpp>
13// Returns a pointer to a double that has value 5.0
14// and must be freed using thread_alloc::return_memory.
15double *release_thread_alloc(void)
16{       size_t min_bytes = sizeof(double);
17        size_t cap_bytes;
18        void*   v_ptr = CppAD::thread_alloc::get_memory(min_bytes, cap_bytes);
19        double* d_ptr = reinterpret_cast<double*>(v_ptr);
20        *d_ptr        = 5.0;
21        return d_ptr;
Note: See TracBrowser for help on using the repository browser.