49 lines
4.3 KiB
HTML
Executable File
49 lines
4.3 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>MPI On Cell (Documentation): src/noarch/system/moc_comm_rank.c Source File</title>
|
|
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="../../tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.5.6 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="../../main.html"><span>Main Page</span></a></li>
|
|
<li><a href="../../modules.html"><span>Modules</span></a></li>
|
|
<li><a href="../../annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<h1>src/noarch/system/moc_comm_rank.c</h1><a href="../../d3/d9d/moc__comm__rank_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include <<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>></span>
|
|
<a name="l00002"></a>00002 <span class="preprocessor">#ifdef __SPU__</span>
|
|
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>></span>
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#else</span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>></span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor">#endif</span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor"></span>
|
|
<a name="l00008"></a><a class="code" href="../../d1/dd1/group__comm__mgt.html#gbadd556e16667ac8ee86af72299e4915">00008</a> <span class="keywordtype">int</span> <a class="code" href="../../d1/dd1/group__comm__mgt.html#gbadd556e16667ac8ee86af72299e4915" title="Determines the rank of the calling process in the communicator.">MOC_Comm_rank</a>(<a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> *rank)
|
|
<a name="l00009"></a>00009 {
|
|
<a name="l00010"></a>00010 <span class="keywordflow">if</span> (comm == <a class="code" href="../../d1/dd1/group__comm__mgt.html#g14e1cb53b99b5e239d4cc6a8d370ad94" title="Specifies a constant that contains all of the processes.">MOC_COMM_WORLD</a>)
|
|
<a name="l00011"></a>00011 {
|
|
<a name="l00012"></a>00012 *rank = <a class="code" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895" title="Information each node knowns about himself and the world.">node_handle</a>.<a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#9005ee3d6d0ee8b2f15628dcca724710" title="rank of node">rank</a>;
|
|
<a name="l00013"></a>00013 }
|
|
<a name="l00014"></a>00014 <span class="keywordflow">else</span>
|
|
<a name="l00015"></a>00015 <span class="keywordflow">if</span> (comm == <a class="code" href="../../d1/dd1/group__comm__mgt.html#gf8c5dfb6bb79027948fe63f4cf6504eb" title="Specifies a constant that contains only the calling process.">MOC_COMM_SELF</a>)
|
|
<a name="l00016"></a>00016 {
|
|
<a name="l00017"></a>00017 *rank = 0;
|
|
<a name="l00018"></a>00018 }
|
|
<a name="l00019"></a>00019 <span class="keywordflow">else</span> <span class="comment">// if ( comm == MPI_COMM_NULL )</span>
|
|
<a name="l00020"></a>00020 {
|
|
<a name="l00021"></a>00021 *rank = 0;
|
|
<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gc1e776c0e7cb8c97391dd6ac476295a1" title="Invalid communicator.">MOC_ERR_COMM</a>;
|
|
<a name="l00023"></a>00023 }
|
|
<a name="l00024"></a>00024 <span class="keywordflow">return</span> 0;
|
|
<a name="l00025"></a>00025 }
|
|
<a name="l00026"></a>00026
|
|
</pre></div></div>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:47 2009 for MPI On Cell (Documentation) by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
|
|
</body>
|
|
</html>
|