Changeset 354 for doc/html/timer.html
- Timestamp:
- 06/02/09 10:24:26 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/html/timer.html
r353 r354 62 62 <div class="contents"> 63 63 <h1><a class="anchor" name="timer">Using timers to measure execution time </a></h1>In this example we are using the Real_Timer class to measure the execution time of a simple program. The Real_Timer class is included in the itmisc library.<p> 64 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include < <a class="code" href="itbase_8h.html" title="Include file for the IT++ base module.">itpp/itbase.h</a>></span>64 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itbase.h></span> 65 65 66 66 <span class="keyword">using namespace </span>itpp; … … 73 73 { 74 74 <span class="comment">//Declare the scalars used:</span> 75 <span class="keywordtype">long</span> i, <a class="code" href="group__matrix__functions.html#g8b3dcc61484fce58ee4244d5731e18fa" title="Sum of all elements in the vector.">sum</a>, N;75 <span class="keywordtype">long</span> i, sum, N; 76 76 77 77 <span class="comment">//Declare tt as an instance of the timer class:</span> … … 103 103 When you run this program, the output will look something like this:<p> 104 104 <div class="fragment"><pre class="fragment">Elapsed time = 0.000797055 seconds 105 The sum of all integers from 0 <a class="code" href="group__fixed.html#gb4732503214b5293aef0cbd2ab271c7c">to</a>999999 equals 1783293664105 The sum of all integers from 0 to 999999 equals 1783293664 106 106 </pre></div> </div> 107 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10: 02:142009 for mixpp by 107 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:11:00 2009 for mixpp by 108 108 <a href="http://www.doxygen.org/index.html"> 109 109 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>