Show
Ignore:
Timestamp:
08/30/09 22:13:15 (15 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/timer.html

    r590 r591  
    1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     2<html xmlns="http://www.w3.org/1999/xhtml"> 
     3<head> 
     4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 
    35<title>mixpp: Using timers to measure execution time</title> 
    4 <link href="tabs.css" rel="stylesheet" type="text/css"> 
    5 <link href="doxygen.css" rel="stylesheet" type="text/css"> 
    6 </head><body> 
    7 <!-- Generated by Doxygen 1.5.8 --> 
     6<link href="tabs.css" rel="stylesheet" type="text/css"/> 
     7<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
     8</head> 
     9<body> 
     10<!-- Generated by Doxygen 1.6.1 --> 
    811<script type="text/javascript"> 
    912<!-- 
     
    6063</div> 
    6164<div class="contents"> 
    62 <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> 
     65 
     66 
     67<h1><a class="anchor" id="timer">Using timers to measure execution time </a></h1><p>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> 
    6368<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span> 
    6469 
     
    9297 
    9398        <span class="comment">//Print the result of the processing:</span> 
    94         cout &lt;&lt; <span class="stringliteral">"The sum of all integers from 0 to "</span> &lt;&lt; N - 1 &lt;&lt; <span class="stringliteral">" equals "</span> &lt;&lt; sum &lt;&lt; endl; 
     99        cout &lt;&lt; <span class="stringliteral">&quot;The sum of all integers from 0 to &quot;</span> &lt;&lt; N - 1 &lt;&lt; <span class="stringliteral">&quot; equals &quot;</span> &lt;&lt; sum &lt;&lt; endl; 
    95100 
    96101        <span class="comment">//Exit program:</span> 
     
    98103 
    99104} 
    100 </pre></div><p> 
    101 When you run this program, the output will look something like this:<p> 
     105</pre></div><p>When you run this program, the output will look something like this:</p> 
    102106<div class="fragment"><pre class="fragment">Elapsed time = 0.000797055 seconds 
    103107The sum of all integers from 0 to 999999 equals 1783293664 
    104108</pre></div> </div> 
    105 <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:42 2009 for mixpp by&nbsp; 
     109<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by&nbsp; 
    106110<a href="http://www.doxygen.org/index.html"> 
    107 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> 
     111<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 
    108112</body> 
    109113</html>