Imported Upstream version 1.64.0
[platform/upstream/boost.git] / doc / html / boost / mpi / timer.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <title>Class timer</title>
6 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9 <link rel="up" href="../../mpi/reference.html#header.boost.mpi.timer_hpp" title="Header &lt;boost/mpi/timer.hpp&gt;">
10 <link rel="prev" href="status.html" title="Class status">
11 <link rel="next" href="../../mpi/python.html" title="Python Bindings">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table cellpadding="2" width="100%"><tr>
15 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16 <td align="center"><a href="../../../../index.html">Home</a></td>
17 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20 <td align="center"><a href="../../../../more/index.htm">More</a></td>
21 </tr></table>
22 <hr>
23 <div class="spirit-nav">
24 <a accesskey="p" href="status.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.timer_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../mpi/python.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25 </div>
26 <div class="refentry">
27 <a name="boost.mpi.timer"></a><div class="titlepage"></div>
28 <div class="refnamediv">
29 <h2><span class="refentrytitle">Class timer</span></h2>
30 <p>boost::mpi::timer &#8212; A simple timer that provides access to the MPI timing facilities. </p>
31 </div>
32 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
33 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../mpi/reference.html#header.boost.mpi.timer_hpp" title="Header &lt;boost/mpi/timer.hpp&gt;">boost/mpi/timer.hpp</a>&gt;
34
35 </span>
36 <span class="keyword">class</span> <a class="link" href="timer.html" title="Class timer">timer</a> <span class="special">{</span>
37 <span class="keyword">public</span><span class="special">:</span>
38   <span class="comment">// <a class="link" href="timer.html#boost.mpi.timerconstruct-copy-destruct">construct/copy/destruct</a></span>
39   <a class="link" href="timer.html#idp669249648-bb"><span class="identifier">timer</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
40
41   <span class="comment">// <a class="link" href="timer.html#idp669241360-bb">public member functions</a></span>
42   <span class="keyword">void</span> <a class="link" href="timer.html#idp669241920-bb"><span class="identifier">restart</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
43   <span class="keyword">double</span> <a class="link" href="timer.html#idp669244176-bb"><span class="identifier">elapsed</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
44   <span class="keyword">double</span> <a class="link" href="timer.html#idp669245792-bb"><span class="identifier">elapsed_max</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
45   <span class="keyword">double</span> <a class="link" href="timer.html#idp669247440-bb"><span class="identifier">elapsed_min</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
46
47   <span class="comment">// <a class="link" href="timer.html#idp669251344-bb">public static functions</a></span>
48   <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="timer.html#idp669251904-bb"><span class="identifier">time_is_global</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
49 <span class="special">}</span><span class="special">;</span></pre></div>
50 <div class="refsect1">
51 <a name="idp423283840"></a><h2>Description</h2>
52 <p>The <code class="computeroutput">timer</code> class is a simple wrapper around the MPI timing facilities that mimics the interface of the Boost Timer library. </p>
53 <div class="refsect2">
54 <a name="idp423285360"></a><h3>
55 <a name="boost.mpi.timerconstruct-copy-destruct"></a><code class="computeroutput">timer</code> 
56         public
57        construct/copy/destruct</h3>
58 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
59 <pre class="literallayout"><a name="idp669249648-bb"></a><span class="identifier">timer</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
60 <p>Initializes the timer</p>
61 <p>
62 </p>
63 <div class="variablelist"><table border="0" class="variablelist compact">
64 <colgroup>
65 <col align="left" valign="top">
66 <col>
67 </colgroup>
68 <tbody><tr>
69 <td><p><span class="term">Postconditions:</span></p></td>
70 <td><p><code class="computeroutput">elapsed()</code> == 0 </p></td>
71 </tr></tbody>
72 </table></div>
73 </li></ol></div>
74 </div>
75 <div class="refsect2">
76 <a name="idp423293712"></a><h3>
77 <a name="idp669241360-bb"></a><code class="computeroutput">timer</code> public member functions</h3>
78 <div class="orderedlist"><ol class="orderedlist" type="1">
79 <li class="listitem">
80 <pre class="literallayout"><span class="keyword">void</span> <a name="idp669241920-bb"></a><span class="identifier">restart</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
81 <p>Restart the timer.</p>
82 <p>
83 </p>
84 <div class="variablelist"><table border="0" class="variablelist compact">
85 <colgroup>
86 <col align="left" valign="top">
87 <col>
88 </colgroup>
89 <tbody><tr>
90 <td><p><span class="term">Postconditions:</span></p></td>
91 <td><p><code class="computeroutput">elapsed()</code> == 0 </p></td>
92 </tr></tbody>
93 </table></div>
94 </li>
95 <li class="listitem">
96 <pre class="literallayout"><span class="keyword">double</span> <a name="idp669244176-bb"></a><span class="identifier">elapsed</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
97 <p>Return the amount of time that has elapsed since the last construction or reset, in seconds. </p>
98 </li>
99 <li class="listitem">
100 <pre class="literallayout"><span class="keyword">double</span> <a name="idp669245792-bb"></a><span class="identifier">elapsed_max</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
101 <p>Return an estimate of the maximum possible value of elapsed(). Note that this routine may return too high a value on some systems. </p>
102 </li>
103 <li class="listitem">
104 <pre class="literallayout"><span class="keyword">double</span> <a name="idp669247440-bb"></a><span class="identifier">elapsed_min</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
105 <p>Returns the minimum non-zero value that <code class="computeroutput">elapsed()</code> may return. This is the resolution of the timer. </p>
106 </li>
107 </ol></div>
108 </div>
109 <div class="refsect2">
110 <a name="idp423319568"></a><h3>
111 <a name="idp669251344-bb"></a><code class="computeroutput">timer</code> public static functions</h3>
112 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
113 <pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idp669251904-bb"></a><span class="identifier">time_is_global</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
114 <p>Determines whether the elapsed time values are global times or local processor times. </p>
115 </li></ol></div>
116 </div>
117 </div>
118 </div>
119 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
120 <td align="left"></td>
121 <td align="right"><div class="copyright-footer">Copyright &#169; 2005-2007 Douglas Gregor,
122       Matthias Troyer, Trustees of Indiana University<p>
123         Distributed under the Boost Software License, Version 1.0. (See accompanying
124         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">
125         http://www.boost.org/LICENSE_1_0.txt </a>)
126       </p>
127 </div></td>
128 </tr></table>
129 <hr>
130 <div class="spirit-nav">
131 <a accesskey="p" href="status.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.timer_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../mpi/python.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
132 </div>
133 </body>
134 </html>