Codebase list cppad / upstream/2015.00.00.7 doc / atomic_base_clear.xml
upstream/2015.00.00.7

Tree @upstream/2015.00.00.7 (Download .tar.gz)

atomic_base_clear.xml @upstream/2015.00.00.7raw · history · blame

<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Free Static Variables</title>
<meta http-equiv='Content-Type' content='text/html' charset='utf-8'/>
<meta name="description" id="description" content="Free Static Variables"/>
<meta name="keywords" id="keywords" content=" free static variables atomic clear syntax purpose future use restriction "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_atomic_base_clear_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="atomic_rev_sparse_hes.xml" target="_top">Prev</a>
</td><td><a href="atomic_get_started.cpp.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>AD</option>
<option>ADValued</option>
<option>atomic</option>
<option>atomic_base</option>
<option>atomic_base_clear</option>
</select>
</td>
<td>
<select onchange='choose_down3(this)'>
<option>ADValued-&gt;</option>
<option>Arithmetic</option>
<option>std_math_ad</option>
<option>MathOther</option>
<option>CondExp</option>
<option>Discrete</option>
<option>atomic</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>atomic-&gt;</option>
<option>checkpoint</option>
<option>atomic_base</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>atomic_base-&gt;</option>
<option>atomic_ctor</option>
<option>atomic_option</option>
<option>atomic_afun</option>
<option>atomic_forward</option>
<option>atomic_reverse</option>
<option>atomic_for_sparse_jac</option>
<option>atomic_rev_sparse_jac</option>
<option>atomic_rev_sparse_hes</option>
<option>atomic_base_clear</option>
<option>atomic_get_started.cpp</option>
<option>atomic_norm_sq.cpp</option>
<option>atomic_reciprocal.cpp</option>
<option>atomic_tangent.cpp</option>
<option>atomic_hes_sparse.cpp</option>
<option>atomic_mat_mul.cpp</option>
</select>
</td>
<td>atomic_base_clear</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Syntax</option>
<option>Purpose</option>
<option>Future Use</option>
<option>Restriction</option>
</select>
</td>
</tr></table><br/>



<center><b><big><big>Free Static Variables</big></big></b></center>
<br/>
<b><big><a name="Syntax" id="Syntax">Syntax</a></big></b>

<br/>

<code><font color="blue"><span style='white-space: nowrap'>atomic_base&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;::clear()</span></font></code>


<br/>
<br/>
<b><big><a name="Purpose" id="Purpose">Purpose</a></big></b>
<br/>
Each <code><font color="blue">atomic_base</font></code> objects holds onto work space in order to
avoid repeated memory allocation calls and thereby increase speed
(until it is deleted).
If an the <code><font color="blue">atomic_base</font></code> object is global or static because,
the it does not get deleted.
This is a problem when using 
<code><font color="blue">thread_alloc</font></code> <a href="ta_free_all.xml" target="_top"><span style='white-space: nowrap'>free_all</span></a>
 
to check that all allocated memory has been freed. 
Calling this <code><font color="blue">clear</font></code> function will free all the
memory currently being held onto by the 

<code><font color="blue"><span style='white-space: nowrap'>atomic_base&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 class.

<br/>
<br/>
<b><big><a name="Future Use" id="Future Use">Future Use</a></big></b>
<br/>
If there is future use of an <code><font color="blue">atomic_base</font></code> object,
after a call to <code><font color="blue">clear</font></code>,
the work space will be reallocated and held onto.

<br/>
<br/>
<b><big><a name="Restriction" id="Restriction">Restriction</a></big></b>
<br/>
This routine cannot be called
while in <a href="ta_in_parallel.xml" target="_top"><span style='white-space: nowrap'>parallel</span></a>
 execution mode.


<hr/>Input File: cppad/local/atomic_base.hpp

</body>
</html>