CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
abort_recording.hpp
Go to the documentation of this file.
1 # ifndef CPPAD_CORE_ABORT_RECORDING_HPP
2 # define CPPAD_CORE_ABORT_RECORDING_HPP
3 
4 /* --------------------------------------------------------------------------
5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
6 
7 CppAD is distributed under multiple licenses. This distribution is under
8 the terms of the
9  Eclipse Public License Version 1.0.
10 
11 A copy of this license is included in the COPYING file of this distribution.
12 Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
13 -------------------------------------------------------------------------- */
14 /*
15 $begin abort_recording$$
16 $spell
17 $$
18 
19 $section Abort Recording of an Operation Sequence$$
20 $mindex tape$$
21 
22 
23 $head Syntax$$
24 $codei%AD<%Base%>::abort_recording()%$$
25 
26 $head Purpose$$
27 Sometimes it is necessary to abort the recording of an operation sequence
28 that started with a call of the form
29 $codei%
30  Independent(%x%)
31 %$$
32 If such a recording is currently in progress,
33 $code abort_recording$$ will stop the recording and delete the
34 corresponding information.
35 Otherwise, $code abort_recording$$ has no effect.
36 
37 $children%
38  example/general/abort_recording.cpp
39 %$$
40 $head Example$$
41 The file
42 $cref abort_recording.cpp$$
43 contains an example and test of this operation.
44 It returns true if it succeeds and false otherwise.
45 
46 $end
47 ----------------------------------------------------------------------------
48 */
49 
50 
51 namespace CppAD {
52  template <typename Base>
55  if( tape != CPPAD_NULL )
57  }
58 }
59 
60 # endif
static local::ADTape< Base > * tape_manage(tape_manage_job job)
Create and delete tapes that record AD&lt;Base&gt; operations for current thread.
Definition: tape_link.hpp:210
static local::ADTape< Base > * tape_ptr(void)
Pointer for the tape for this AD&lt;Base&gt; class and the current thread.
Definition: tape_link.hpp:130
static void abort_recording(void)
Class used to hold tape that records AD&lt;Base&gt; operations.
Definition: ad_tape.hpp:26