<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Adolc Test Utility: Allocate and Free Memory For a Matrix</title>
<meta name="description" id="description" content="Adolc Test Utility: Allocate and Free Memory For a Matrix"/>
<meta name="keywords" id="keywords" content=" adolc_alloc_mat alloc adolc matrix "/>
<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='_adolc_alloc_mat_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="adolc_sparse_jacobian.cpp.xml" target="_top">Prev</a>
</td><td><a href="speed_cppad.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>speed</option>
<option>speed_adolc</option>
<option>adolc_alloc_mat</option>
</select>
</td>
<td>
<select onchange='choose_down3(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>speed-&gt;</option>
<option>speed_main</option>
<option>speed_utility</option>
<option>speed_double</option>
<option>speed_adolc</option>
<option>speed_cppad</option>
<option>speed_fadbad</option>
<option>speed_sacado</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>speed_adolc-&gt;</option>
<option>adolc_det_minor.cpp</option>
<option>adolc_det_lu.cpp</option>
<option>adolc_mat_mul.cpp</option>
<option>adolc_ode.cpp</option>
<option>adolc_poly.cpp</option>
<option>adolc_sparse_hessian.cpp</option>
<option>adolc_sparse_jacobian.cpp</option>
<option>adolc_alloc_mat</option>
</select>
</td>
<td>adolc_alloc_mat</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Syntax</option>
<option>Purpose</option>
<option>m</option>
<option>n</option>
<option>mat</option>
</select>
</td>
</tr></table><br/>



<center><b><big><big>Adolc Test Utility: Allocate and Free Memory For a Matrix</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'>mat</span></font><i><font color="black"><span style='white-space: nowrap'>&#xA0;=&#xA0;adolc_alloc_mat(</span></font></i><font color="blue"><span style='white-space: nowrap'>m</span></font><i><font color="black"><span style='white-space: nowrap'>,&#xA0;</span></font></i><font color="blue"><span style='white-space: nowrap'>n</span></font><i><font color="black"><span style='white-space: nowrap'>)<br/>
</span></font></i></code>

<code><font color="blue"><span style='white-space: nowrap'>adolc_free_mat(</span></font><i><font color="black"><span style='white-space: nowrap'>mat</span></font></i><font color="blue"><span style='white-space: nowrap'>)<br/>
</span></font></code>
<br/>
<b><big><a name="Purpose" id="Purpose">Purpose</a></big></b>
<br/>
Use the <a href="thread_alloc.xml" target="_top"><span style='white-space: nowrap'>thread_alloc</span></a>
 memory allocator to allocate and free
memory that can be used as a matrix with the Adolc package.

<br/>
<br/>
<b><big><a name="m" id="m">m</a></big></b>
<br/>
Is the number of rows in the matrix.

<br/>
<br/>
<b><big><a name="n" id="n">n</a></big></b>
<br/>
Is the number of columns in the matrix.

<br/>
<br/>
<b><big><a name="mat" id="mat">mat</a></big></b>
<br/>
Is the matrix.
To be specific, 
between a call to <code><font color="blue">adolc_alloc_mat</font></code>,
and the corresponding call to <code><font color="blue">adolc_free_mat</font></code>,
for 
<code><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;0&#xA0;,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>...</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>m</span></font></i><font color="blue"><span style='white-space: nowrap'>-1</span></font></code>

and 
<code><i><font color="black"><span style='white-space: nowrap'>j</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;0&#xA0;,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>...</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>n</span></font></i><font color="blue"><span style='white-space: nowrap'>-1</span></font></code>
,

<code><i><font color="black"><span style='white-space: nowrap'>mat</span></font></i><font color="blue"><span style='white-space: nowrap'>[</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>][</span></font><i><font color="black"><span style='white-space: nowrap'>j</span></font></i><font color="blue"><span style='white-space: nowrap'>]</span></font></code>
 is the element in row 
<code><i><font color="black"><span style='white-space: nowrap'>i</span></font></i></code>

and column 
<code><i><font color="black"><span style='white-space: nowrap'>j</span></font></i></code>
.


<hr/>Input File: speed/adolc/alloc_mat.cpp

</body>
</html>
