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=UTF-8"> 5<title>Class status</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.status_hpp" title="Header <boost/mpi/status.hpp>"> 10<link rel="prev" href="skeleton_proxy.html" title="Struct template skeleton_proxy"> 11<link rel="next" href="timer.html" title="Class timer"> 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="skeleton_proxy.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.status_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="timer.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.mpi.status"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Class status</span></h2> 30<p>boost::mpi::status — Contains information about a message that has been or can be received. </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: <<a class="link" href="../../mpi/reference.html#header.boost.mpi.status_hpp" title="Header <boost/mpi/status.hpp>">boost/mpi/status.hpp</a>> 34 35</span> 36<span class="keyword">class</span> <a class="link" href="status.html" title="Class status">status</a> <span class="special">{</span> 37<span class="keyword">public</span><span class="special">:</span> 38 <span class="comment">// <a class="link" href="status.html#boost.mpi.statusconstruct-copy-destruct">construct/copy/destruct</a></span> 39 <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_5-bb"><span class="identifier">status</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 40 <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_6-bb"><span class="identifier">status</span></a><span class="special">(</span><span class="identifier">MPI_Status</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 41 42 <span class="comment">// <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4-bb">public member functions</a></span> 43 <span class="keyword">int</span> <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_1-bb"><span class="identifier">source</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 44 <span class="keyword">int</span> <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_2-bb"><span class="identifier">tag</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 45 <span class="keyword">int</span> <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_3-bb"><span class="identifier">error</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 46 <span class="keyword">bool</span> <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_4-bb"><span class="identifier">cancelled</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 47 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="identifier">optional</span><span class="special"><</span> <span class="keyword">int</span> <span class="special">></span> <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_5-bb"><span class="identifier">count</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 48 <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_6-bb"><span class="keyword">operator</span> <span class="identifier">MPI_Status</span> <span class="special">&</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 49 <a class="link" href="status.html#id-1_3_27_7_24_2_1_1_4_7-bb"><span class="keyword">operator</span> <span class="keyword">const</span> <span class="identifier">MPI_Status</span> <span class="special">&</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 50 51 <span class="comment">// public data members</span> 52 <span class="keyword">mutable</span> <span class="keyword">int</span> <span class="identifier">m_count</span><span class="special">;</span> 53<span class="special">}</span><span class="special">;</span></pre></div> 54<div class="refsect1"> 55<a name="id-1.3.27.7.25.4.4"></a><h2>Description</h2> 56<p>This structure contains status information about messages that have been received (with <code class="computeroutput">communicator::recv</code>) or can be received (returned from <code class="computeroutput">communicator::probe</code> or <code class="computeroutput">communicator::iprobe</code>). It permits access to the source of the message, message tag, error code (rarely used), or the number of elements that have been transmitted. </p> 57<div class="refsect2"> 58<a name="id-1.3.27.7.25.4.4.3"></a><h3> 59<a name="boost.mpi.statusconstruct-copy-destruct"></a><code class="computeroutput">status</code> 60 public 61 construct/copy/destruct</h3> 62<div class="orderedlist"><ol class="orderedlist" type="1"> 63<li class="listitem"><pre class="literallayout"><a name="id-1_3_27_7_24_2_1_1_5-bb"></a><span class="identifier">status</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> 64<li class="listitem"><pre class="literallayout"><a name="id-1_3_27_7_24_2_1_1_6-bb"></a><span class="identifier">status</span><span class="special">(</span><span class="identifier">MPI_Status</span> <span class="keyword">const</span> <span class="special">&</span> s<span class="special">)</span><span class="special">;</span></pre></li> 65</ol></div> 66</div> 67<div class="refsect2"> 68<a name="id-1.3.27.7.25.4.4.4"></a><h3> 69<a name="id-1_3_27_7_24_2_1_1_4-bb"></a><code class="computeroutput">status</code> public member functions</h3> 70<div class="orderedlist"><ol class="orderedlist" type="1"> 71<li class="listitem"> 72<pre class="literallayout"><span class="keyword">int</span> <a name="id-1_3_27_7_24_2_1_1_4_1-bb"></a><span class="identifier">source</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 73<p>Retrieve the source of the message. </p> 74</li> 75<li class="listitem"> 76<pre class="literallayout"><span class="keyword">int</span> <a name="id-1_3_27_7_24_2_1_1_4_2-bb"></a><span class="identifier">tag</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 77<p>Retrieve the message tag. </p> 78</li> 79<li class="listitem"> 80<pre class="literallayout"><span class="keyword">int</span> <a name="id-1_3_27_7_24_2_1_1_4_3-bb"></a><span class="identifier">error</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 81<p>Retrieve the error code. </p> 82</li> 83<li class="listitem"> 84<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_27_7_24_2_1_1_4_4-bb"></a><span class="identifier">cancelled</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 85<p>Determine whether the communication associated with this object has been successfully cancelled. </p> 86</li> 87<li class="listitem"> 88<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="identifier">optional</span><span class="special"><</span> <span class="keyword">int</span> <span class="special">></span> <a name="id-1_3_27_7_24_2_1_1_4_5-bb"></a><span class="identifier">count</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 89<p>Determines the number of elements of type <code class="computeroutput">T</code> contained in the message. The type <code class="computeroutput">T</code> must have an associated data type, i.e., <code class="computeroutput">is_mpi_datatype<T></code> must derive <code class="computeroutput">mpl::true_</code>. In cases where the type <code class="computeroutput">T</code> does not match the transmitted type, this routine will return an empty <code class="computeroutput">optional<int></code>.</p> 90<p> 91</p> 92<div class="variablelist"><table border="0" class="variablelist compact"> 93<colgroup> 94<col align="left" valign="top"> 95<col> 96</colgroup> 97<tbody><tr> 98<td><p><span class="term">Returns:</span></p></td> 99<td><p>the number of <code class="computeroutput">T</code> elements in the message, if it can be determined. </p></td> 100</tr></tbody> 101</table></div> 102</li> 103<li class="listitem"> 104<pre class="literallayout"><a name="id-1_3_27_7_24_2_1_1_4_6-bb"></a><span class="keyword">operator</span> <span class="identifier">MPI_Status</span> <span class="special">&</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> 105<p>References the underlying <code class="computeroutput">MPI_Status</code> </p> 106</li> 107<li class="listitem"> 108<pre class="literallayout"><a name="id-1_3_27_7_24_2_1_1_4_7-bb"></a><span class="keyword">operator</span> <span class="keyword">const</span> <span class="identifier">MPI_Status</span> <span class="special">&</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 109<p>References the underlying <code class="computeroutput">MPI_Status</code> </p> 110</li> 111</ol></div> 112</div> 113</div> 114</div> 115<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 116<td align="left"></td> 117<td align="right"><div class="copyright-footer">Copyright © 2005-2007 Douglas Gregor, 118 Matthias Troyer, Trustees of Indiana University<p> 119 Distributed under the Boost Software License, Version 1.0. (See accompanying 120 file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt"> 121 http://www.boost.org/LICENSE_1_0.txt </ulink>) 122 </p> 123</div></td> 124</tr></table> 125<hr> 126<div class="spirit-nav"> 127<a accesskey="p" href="skeleton_proxy.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.status_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="timer.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 128</div> 129</body> 130</html> 131