Initial commit.

This commit is contained in:
2017-10-26 19:57:24 +02:00
commit 9ce8b5485d
1090 changed files with 47036 additions and 0 deletions
@@ -0,0 +1,135 @@
<!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/spu/communication/moc_barrier_spu.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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/spu/communication/moc_barrier_spu.c</h1><a href="../../dc/d59/moc__barrier__spu_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 &lt;stdio.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;spu_mfcio.h&gt;</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00008"></a>00008 <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="l00009"></a>00009
<a name="l00010"></a><a class="code" href="../../dc/d59/moc__barrier__spu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">00010</a> <span class="preprocessor">#define IMOC_BARRIER_TAG 1</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a><a class="code" href="../../db/dc2/group__broadcast.html#g110b00d5a4d9f970ddf8e9bd4c2d8834">00012</a> <span class="keywordtype">int</span> <a class="code" href="../../db/dc2/group__broadcast.html#g110b00d5a4d9f970ddf8e9bd4c2d8834" title="Blocks the caller until all processes in the communicator have called it; that is...">MOC_Barrier</a>(<a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm)
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014 <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a> tempQueue[<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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a>] <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&amp;quot;No nodes in list\n&amp;quot;);...">__attribute__</a>((__aligned__(16)));
<a name="l00015"></a>00015 <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a> *sourceQueueEntry;
<a name="l00016"></a>00016 <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> status;
<a name="l00017"></a>00017 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> tag_id;
<a name="l00018"></a>00018 <span class="keywordtype">int</span> err, qindex;
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <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="l00021"></a>00021 <span class="keywordflow">return</span> 0;
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <span class="keywordflow">if</span> (<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 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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1)
<a name="l00024"></a>00024 {
<a name="l00025"></a>00025 <span class="keywordtype">int</span> t;
<a name="l00026"></a>00026 <span class="keywordflow">for</span> (t = 0; t &lt; <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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1; t++)
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028 <span class="comment">//look up if there is data here</span>
<a name="l00029"></a>00029 sourceQueueEntry = 0;
<a name="l00030"></a>00030 <span class="keywordflow">while</span> (sourceQueueEntry == 0)
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 sourceQueueEntry = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g8980da77fa506e9a6d503c8c6eba68e2" title="Get the next valid message-envelope from &amp;quot;source&amp;quot; with specified &amp;quot;tag&amp;quot;...">IMOC_get_entry</a>(t, <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>, comm, 1,
<a name="l00033"></a>00033 &amp;status);
<a name="l00034"></a>00034 }
<a name="l00035"></a>00035 sourceQueueEntry-&gt;<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#38288113f9b7adee1e444850112ff807" title="flag-union">flags</a>.<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#e51379150ad496c8844a4b9b0096120b" title="union-value">value</a> = 0;
<a name="l00036"></a>00036 }
<a name="l00037"></a>00037 <span class="keywordflow">for</span> (t = 0; t &lt; <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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1; t++)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="comment">/* Get queue from remote-node */</span>
<a name="l00040"></a>00040 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00041"></a>00041 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00042"></a>00042 mfc_get(tempQueue, <a class="code" href="../../df/ddf/group__internal__am.html#gf02c3d971a2b5e72d22c9c16b1748c04" title="Effective base-address of own remote queue at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE</a>(t), <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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a>
<a name="l00043"></a>00043 * <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>), tag_id, 0, 0);
<a name="l00044"></a>00044 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00045"></a>00045 mfc_read_tag_status_all();
<a name="l00046"></a>00046 mfc_tag_release(tag_id);
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="comment">/* search free entry in message-queue */</span>
<a name="l00049"></a>00049 err = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message-queue (a local copy of the message-queue has to be...">IMOC_getFreeEntry</a>(tempQueue, <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>, comm, 1,
<a name="l00050"></a>00050 &amp;qindex);
<a name="l00051"></a>00051 <span class="keywordflow">if</span> (err)
<a name="l00052"></a>00052 <span class="keywordflow">return</span> err;
<a name="l00053"></a>00053
<a name="l00054"></a>00054 tempQueue[qindex].communicator = comm;
<a name="l00055"></a>00055 tempQueue[qindex].flags.bits.special = 1;
<a name="l00056"></a>00056 tempQueue[qindex].flags.bits.valid = 1;
<a name="l00057"></a>00057 tempQueue[qindex].tag = <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>;
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="comment">/* write message-envelope into queue */</span>
<a name="l00060"></a>00060 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00061"></a>00061 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00062"></a>00062 mfc_put(&amp;tempQueue[qindex], <a class="code" href="../../df/ddf/group__internal__am.html#gf9ad028ccbfa406c49a0ebd943486698" title="Effective base-address of own remote queue-entry at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE_ENTRY</a>(t, qindex),
<a name="l00063"></a>00063 <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>), tag_id, 0, 0);
<a name="l00064"></a>00064 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00065"></a>00065 mfc_read_tag_status_all();
<a name="l00066"></a>00066 mfc_tag_release(tag_id);
<a name="l00067"></a>00067 }
<a name="l00068"></a>00068 }
<a name="l00069"></a>00069 <span class="keywordflow">else</span>
<a name="l00070"></a>00070 {
<a name="l00071"></a>00071 <span class="comment">/* Get queue from remote-node */</span>
<a name="l00072"></a>00072 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00073"></a>00073 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00074"></a>00074 mfc_get(tempQueue, <a class="code" href="../../df/ddf/group__internal__am.html#gf02c3d971a2b5e72d22c9c16b1748c04" title="Effective base-address of own remote queue at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE</a>(<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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1),
<a name="l00075"></a>00075 <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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a> * <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>),
<a name="l00076"></a>00076 tag_id, 0, 0);
<a name="l00077"></a>00077 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00078"></a>00078 mfc_read_tag_status_all();
<a name="l00079"></a>00079 mfc_tag_release(tag_id);
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="comment">/* search free entry in message-queue */</span>
<a name="l00082"></a>00082 err = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message-queue (a local copy of the message-queue has to be...">IMOC_getFreeEntry</a>(tempQueue, <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>, comm, 1, &amp;qindex);
<a name="l00083"></a>00083 <span class="keywordflow">if</span> (err)
<a name="l00084"></a>00084 <span class="keywordflow">return</span> err;
<a name="l00085"></a>00085
<a name="l00086"></a>00086 tempQueue[qindex].communicator = comm;
<a name="l00087"></a>00087 tempQueue[qindex].flags.bits.special = 1;
<a name="l00088"></a>00088 tempQueue[qindex].flags.bits.valid = 1;
<a name="l00089"></a>00089 tempQueue[qindex].tag = <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>;
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="comment">/* write message-envelope into queue */</span>
<a name="l00092"></a>00092 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00093"></a>00093 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00094"></a>00094 mfc_put(&amp;tempQueue[qindex],
<a name="l00095"></a>00095 <a class="code" href="../../df/ddf/group__internal__am.html#gf9ad028ccbfa406c49a0ebd943486698" title="Effective base-address of own remote queue-entry at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE_ENTRY</a>(<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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1, qindex),
<a name="l00096"></a>00096 <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>), tag_id, 0, 0);
<a name="l00097"></a>00097 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00098"></a>00098 mfc_read_tag_status_all();
<a name="l00099"></a>00099 mfc_tag_release(tag_id);
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <span class="comment">//look up if there is data here</span>
<a name="l00102"></a>00102 sourceQueueEntry = 0;
<a name="l00103"></a>00103 <span class="keywordflow">while</span> (sourceQueueEntry == 0)
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105 sourceQueueEntry = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g8980da77fa506e9a6d503c8c6eba68e2" title="Get the next valid message-envelope from &amp;quot;source&amp;quot; with specified &amp;quot;tag&amp;quot;...">IMOC_get_entry</a>(<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#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a> - 1,
<a name="l00106"></a>00106 <a class="code" href="../../d1/d72/moc__barrier__ppu_8c.html#8a4118b9364b4bb700441e9e9dd9c3ab">IMOC_BARRIER_TAG</a>, comm, 1, &amp;status);
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108 sourceQueueEntry-&gt;<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#38288113f9b7adee1e444850112ff807" title="flag-union">flags</a>.<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html#e51379150ad496c8844a4b9b0096120b" title="union-value">value</a> = 0;
<a name="l00109"></a>00109 }
<a name="l00110"></a>00110
<a name="l00111"></a>00111 <span class="keywordflow">return</span> 0;
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113
</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&nbsp;
<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>
@@ -0,0 +1,49 @@
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="include/spu/moc_dma_spu.h" alt="" coords="11823,80,12009,107">
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="include/spu/moc.h" alt="" coords="7055,155,7183,181">
<area shape="rect" href="$de/d76/moc__issend__spu_8c.html" title="src/spu/communication/moc_issend_spu.c" alt="" coords="5,229,275,256">
<area shape="rect" href="$d9/dab/moc__recv__spu_8c.html" title="src/spu/communication/moc_recv_spu.c" alt="" coords="299,229,552,256">
<area shape="rect" href="$d3/d71/moc__ssend__spu_8c.html" title="src/spu/communication/moc_ssend_spu.c" alt="" coords="10941,229,11208,256">
<area shape="rect" href="$d8/d91/moc__dma-get__spu_8c.html" title="src/spu/dma/moc_dma&#45;get_spu.c" alt="" coords="12056,229,12272,256">
<area shape="rect" href="$da/dea/moc__dma-iget__spu_8c.html" title="src/spu/dma/moc_dma&#45;iget_spu.c" alt="" coords="12296,229,12515,256">
<area shape="rect" href="$dc/de8/moc__dma-iput__spu_8c.html" title="src/spu/dma/moc_dma&#45;iput_spu.c" alt="" coords="12539,229,12757,256">
<area shape="rect" href="$d8/d15/moc__dma-test__spu_8c.html" title="src/spu/dma/moc_dma&#45;test_spu.c" alt="" coords="12781,229,13000,256">
<area shape="rect" href="$d2/d14/moc__dma-wait__spu_8c.html" title="src/spu/dma/moc_dma&#45;wait_spu.c" alt="" coords="11232,229,11451,256">
<area shape="rect" href="$d7/daf/imoc__dma-iget__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;iget_spu.c" alt="" coords="11475,229,11741,256">
<area shape="rect" href="$d8/d30/imoc__dma-iput__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;iput_spu.c" alt="" coords="11765,229,12032,256">
<area shape="rect" href="$d6/dcd/moc__translate__ls__ea__spu_8c.html" title="src/spu/dma/moc_translate_ls_ea_spu.c" alt="" coords="11871,155,12127,181">
<area shape="rect" href="$d6/db1/moc__bcast_8c.html" title="src/noarch/communication/moc_bcast.c" alt="" coords="2320,229,2573,256">
<area shape="rect" href="$d2/d97/moc__iprobe_8c.html" title="src/noarch/communication/moc_iprobe.c" alt="" coords="2597,229,2853,256">
<area shape="rect" href="$d3/dc2/moc__isend_8c.html" title="src/noarch/communication/moc_isend.c" alt="" coords="2877,229,3128,256">
<area shape="rect" href="$d1/d8a/moc__probe_8c.html" title="src/noarch/communication/moc_probe.c" alt="" coords="3152,229,3405,256">
<area shape="rect" href="$db/d55/moc__send_8c.html" title="src/noarch/communication/moc_send.c" alt="" coords="3429,229,3677,256">
<area shape="rect" href="$d6/d21/moc__send__recv_8c.html" title="src/noarch/communication/moc_send_recv.c" alt="" coords="3701,229,3979,256">
<area shape="rect" href="$d7/d3b/moc__send__recv__replace_8c.html" title="src/noarch/communication/moc_send_recv_replace.c" alt="" coords="4003,229,4331,256">
<area shape="rect" href="$d8/d02/moc__test_8c.html" title="src/noarch/communication/moc_test.c" alt="" coords="4355,229,4597,256">
<area shape="rect" href="$d4/dfc/moc__wait_8c.html" title="src/noarch/communication/moc_wait.c" alt="" coords="4621,229,4864,256">
<area shape="rect" href="$db/d33/imoc__get__entry_8c.html" title="src/noarch/internal/communication/imoc_get_entry.c" alt="" coords="4888,229,5211,256">
<area shape="rect" href="$df/d20/imoc__get__free__entry_8c.html" title="src/noarch/internal/communication/imoc_get_free_entry.c" alt="" coords="5235,229,5587,256">
<area shape="rect" href="$dd/d9a/imoc__get__free__mid_8c.html" title="src/noarch/internal/communication/imoc_get_free_mid.c" alt="" coords="5611,229,5955,256">
<area shape="rect" href="$db/d43/imoc__test__message_8c.html" title="src/noarch/internal/communication/imoc_test_message.c" alt="" coords="5979,229,6331,256">
<area shape="rect" href="$da/d91/imoc__wait__message_8c.html" title="src/noarch/internal/communication/imoc_wait_message.c" alt="" coords="6355,229,6707,256">
<area shape="rect" href="$d3/d9d/moc__comm__rank_8c.html" title="src/noarch/system/moc_comm_rank.c" alt="" coords="6731,229,6973,256">
<area shape="rect" href="$df/ddd/moc__comm__size_8c.html" title="src/noarch/system/moc_comm_size.c" alt="" coords="6997,229,7240,256">
<area shape="rect" href="$d9/d19/moc__error__class_8c.html" title="src/noarch/system/moc_error_class.c" alt="" coords="7264,229,7504,256">
<area shape="rect" href="$df/d8a/moc__get__count_8c.html" title="src/noarch/system/moc_get_count.c" alt="" coords="7528,229,7760,256">
<area shape="rect" href="$da/d6c/moc__get__version_8c.html" title="src/noarch/system/moc_get_version.c" alt="" coords="7784,229,8024,256">
<area shape="rect" href="$d1/d72/moc__barrier__ppu_8c.html" title="src/ppu/communication/moc_barrier_ppu.c" alt="" coords="8048,229,8315,256">
<area shape="rect" href="$d9/d14/moc__bsend__ppu_8c.html" title="src/ppu/communication/moc_bsend_ppu.c" alt="" coords="8339,229,8605,256">
<area shape="rect" href="$dc/d02/moc__issend__ppu_8c.html" title="src/ppu/communication/moc_issend_ppu.c" alt="" coords="8629,229,8899,256">
<area shape="rect" href="$dc/db7/moc__recv__ppu_8c.html" title="src/ppu/communication/moc_recv_ppu.c" alt="" coords="8923,229,9176,256">
<area shape="rect" href="$d2/d00/moc__ssend__ppu_8c.html" title="src/ppu/communication/moc_ssend_ppu.c" alt="" coords="9200,229,9467,256">
<area shape="rect" href="$d7/d58/moc__dma-get__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;get_ppu.c" alt="" coords="9491,229,9707,256">
<area shape="rect" href="$d3/dc6/moc__dma-iget__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;iget_ppu.c" alt="" coords="9731,229,9949,256">
<area shape="rect" href="$d8/d06/moc__dma-iput__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;iput_ppu.c" alt="" coords="9973,229,10192,256">
<area shape="rect" href="$d3/dfa/moc__dma-put__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;put_ppu.c" alt="" coords="10216,229,10432,256">
<area shape="rect" href="$d0/d04/moc__dma-test__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;test_ppu.c" alt="" coords="10456,229,10675,256">
<area shape="rect" href="$d6/de5/moc__dma-wait__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;wait_ppu.c" alt="" coords="10699,229,10917,256">
<area shape="rect" href="$d4/d2d/imoc__dma-get__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;get_ppu.c" alt="" coords="576,229,840,256">
<area shape="rect" href="$d1/da6/imoc__dma-iget__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;iget_ppu.c" alt="" coords="864,229,1131,256">
<area shape="rect" href="$df/d10/imoc__dma-iput__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;iput_ppu.c" alt="" coords="1155,229,1421,256">
<area shape="rect" href="$d3/d8f/imoc__dma-put__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;put_ppu.c" alt="" coords="1445,229,1709,256">
<area shape="rect" href="$d0/dba/imoc__dma-tags__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;tags_ppu.c" alt="" coords="1733,229,2005,256">
<area shape="rect" href="$d4/d5b/imoc__dma-test__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;test_ppu.c" alt="" coords="2029,229,2296,256">
@@ -0,0 +1 @@
7cc02476c851fbb6995d049ea9c3a3e7
Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

@@ -0,0 +1,50 @@
<!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/ppu/internal/dma/imoc_dma-get_ppu.c File Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/ppu/internal/dma/imoc_dma-get_ppu.c File Reference</h1>
<p>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">moc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d8/df3/moc__dma__ppu_8h-source.html">ppu/moc_dma_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d0/d87/imoc__macros_8h-source.html">internal/imoc_macros.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../de/de1/imoc__dma__ppu_8h-source.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html">internal/ppu/imoc_core_ppu.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for imoc_dma-get_ppu.c:</div>
<div class="dynsection">
<p><center><img src="../../d0/dc8/imoc__dma-get__ppu_8c__incl.png" border="0" usemap="#src/ppu/internal/dma/imoc_dma-get_ppu.c_map" alt=""></center>
<map name="src/ppu/internal/dma/imoc_dma-get_ppu.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="164,155,220,181"><area shape="rect" href="../../db/d62/moc__dma__ppu_8h.html" title="ppu/moc_dma_ppu.h" alt="" coords="592,229,733,256"><area shape="rect" href="../../d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="461,80,616,107"><area shape="rect" href="../../de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="325,229,517,256"><area shape="rect" href="../../d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="836,80,1028,107"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="133,229,251,256"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="17,304,159,331"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="337,304,407,331"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="411,379,536,405"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="256,379,387,405"><area shape="rect" href="../../d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="661,304,803,331"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="877,379,981,405"><area shape="rect" href="../../db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="739,155,845,181"></map>
</div>
<p>
<a href="../../d7/df2/imoc__dma-get__ppu_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#g53d36c567e4c98e5d258a7857096e7ab">IMOC_get_data</a> (void *target, uint64_t source, uint32_t size, int dest)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a blocking DMA-get operation. <a href="../../d2/de2/group__internal__p2p__dma.html#g53d36c567e4c98e5d258a7857096e7ab"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:23 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
@@ -0,0 +1,50 @@
<!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/ppu/internal/dma/imoc_dma-test_ppu.c File Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/ppu/internal/dma/imoc_dma-test_ppu.c File Reference</h1>
<p>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;stdint.h&gt;</code><br>
<code>#include &lt;free_align.h&gt;</code><br>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">moc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html">internal/ppu/imoc_core_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../de/de1/imoc__dma__ppu_8h-source.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for imoc_dma-test_ppu.c:</div>
<div class="dynsection">
<p><center><img src="../../d3/d5a/imoc__dma-test__ppu_8c__incl.png" border="0" usemap="#src/ppu/internal/dma/imoc_dma-test_ppu.c_map" alt=""></center>
<map name="src/ppu/internal/dma/imoc_dma-test_ppu.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="208,155,264,181"><area shape="rect" href="../../d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="688,80,880,107"><area shape="rect" href="../../de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="324,229,516,256"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="81,229,199,256"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="177,304,319,331"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="392,304,461,331"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="219,379,344,405"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="368,379,499,405"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="980,379,1084,405"><area shape="rect" href="../../db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="673,155,780,181"><area shape="rect" href="../../db/d62/moc__dma__ppu_8h.html" title="moc_dma_ppu.h" alt="" coords="737,229,855,256"><area shape="rect" href="../../d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="624,304,765,331"></map>
</div>
<p>
<a href="../../d2/df9/imoc__dma-test__ppu_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0">IMOC_test_dma</a> (<a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request, int *flag)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests if a IMOC_iget_data or IMOC_iput_data is completed. <a href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:25 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
@@ -0,0 +1,32 @@
<!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/ppu/dma/moc_translate_ea_ls_ppu.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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/ppu/dma/moc_translate_ea_ls_ppu.c</h1><a href="../../d2/d2a/moc__translate__ea__ls__ppu_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 &lt;<a class="code" href="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.h</a>&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>&gt;</span>
<a name="l00003"></a>00003
<a name="l00004"></a><a class="code" href="../../d9/d16/group__dma__access.html#g40b39bb7c07bc07d783c85b10f0bf60f">00004</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g40b39bb7c07bc07d783c85b10f0bf60f" title="Translates an effective-address of a SPU into the corresponding local-store address...">MOC_Translate_EA_to_LS</a>(uint64_t ea, <span class="keywordtype">int</span> rank, uint32_t* ls)
<a name="l00005"></a>00005 {
<a name="l00006"></a>00006 *ls = (uint32_t) (ea
<a name="l00007"></a>00007 - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[rank - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>].ls_base);
<a name="l00008"></a>00008 <span class="keywordflow">return</span> 0;
<a name="l00009"></a>00009 }
<a name="l00010"></a>00010
</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&nbsp;
<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>
@@ -0,0 +1,44 @@
<!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): Synchronous Communication</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Synchronous Communication<br>
<small>
[<a class="el" href="../../de/db4/group__internal__p2p__blocking.html">Blocking Communication</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Synchronous Communication:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../d4/d71/group__internal__p2p__synch.png" border="0" alt="" usemap="#de/db0/d4_2d71_2group____internal____p2p____synch_map">
<map name="de/db0/d4_2d71_2group____internal____p2p____synch_map">
<area shape="rect" href="../../de/db4/group__internal__p2p__blocking.html" title="Internals about blocking Point&#45;to&#45;Point Communication." alt="" coords="5,5,171,32"></map></td></tr></table></center>
</div>
<div align="center">
<img src="../../synchronous_communication_1.png" alt="synchronous_communication_1.png">
</div>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:15 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,8 @@
<area shape="rect" href="$d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="331,80,523,107">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="464,229,568,256">
<area shape="rect" href="$db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="179,155,285,181">
<area shape="rect" href="$db/d62/moc__dma__ppu_8h.html" title="moc_dma_ppu.h" alt="" coords="125,229,243,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="77,304,147,331">
<area shape="rect" href="$d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="247,304,388,331">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="moc_datatype.h" alt="" coords="201,379,316,405">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="47,379,177,405">
@@ -0,0 +1 @@
b63b51e977313ecc3d53d015b2782d26
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

@@ -0,0 +1,137 @@
<!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): include/internal/spu/imoc_dma_spu.h 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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/internal/spu/imoc_dma_spu.h</h1><a href="../../d4/dce/imoc__dma__spu_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MOC_INTERNAL_GET_DATA_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MOC_INTERNAL_GET_DATA_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include "../../moc.h"</span>
<a name="l00006"></a>00006 <span class="comment"></span>
<a name="l00007"></a>00007 <span class="comment">/**</span>
<a name="l00008"></a>00008 <span class="comment"> * \addtogroup internal_p2p_dma</span>
<a name="l00009"></a>00009 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">//@{</span>
<a name="l00011"></a>00011 <span class="comment"></span><span class="comment">/**</span>
<a name="l00012"></a>00012 <span class="comment"> * @name SPU-only</span>
<a name="l00013"></a>00013 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">//@{</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">/**</span>
<a name="l00018"></a>00018 <span class="comment"> * Internal wrapper-function for a blocking DMA-get operation.</span>
<a name="l00019"></a>00019 <span class="comment"> * Data can be of any size, constraints of low-level DMA-functions</span>
<a name="l00020"></a>00020 <span class="comment"> * are dealt by this function.</span>
<a name="l00021"></a>00021 <span class="comment"> * However data-addresses have to be at least 16-byte aligned.</span>
<a name="l00022"></a>00022 <span class="comment"> * </span>
<a name="l00023"></a>00023 <span class="comment"> * This function actually always reads a multiple of 16 from the source, </span>
<a name="l00024"></a>00024 <span class="comment"> * but copies only size bytes of it to target. This means however that up</span>
<a name="l00025"></a>00025 <span class="comment"> * to 15 bytes are read from an invalid location. As it is never written to</span>
<a name="l00026"></a>00026 <span class="comment"> * them this should always be safe. </span>
<a name="l00027"></a>00027 <span class="comment"> * </span>
<a name="l00028"></a>00028 <span class="comment"> * @param target \b in ls-address of buffer</span>
<a name="l00029"></a>00029 <span class="comment"> * @param source \b in ea-address of data</span>
<a name="l00030"></a>00030 <span class="comment"> * @param size \b in size of data in byte</span>
<a name="l00031"></a>00031 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00032"></a>00032 <span class="comment"> **/</span>
<a name="l00033"></a>00033 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g53d36c567e4c98e5d258a7857096e7ab" title="Internal wrapper-function for a blocking DMA-get operation.">IMOC_get_data</a>(<span class="keywordtype">void</span>* target, uint64_t source, uint32_t size);
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">/**</span>
<a name="l00037"></a>00037 <span class="comment"> * Internal wrapper-function for a blocking DMA-put operation.</span>
<a name="l00038"></a>00038 <span class="comment"> * Data-size should be a multiple of 16 because of low-level constraints, but </span>
<a name="l00039"></a>00039 <span class="comment"> * there is no upper limit of transfer-size.</span>
<a name="l00040"></a>00040 <span class="comment"> * Data-addresses have to be at least 16-byte aligned.</span>
<a name="l00041"></a>00041 <span class="comment"> * </span>
<a name="l00042"></a>00042 <span class="comment"> * This function actually always reads a multiple of 16 from the source, and copies </span>
<a name="l00043"></a>00043 <span class="comment"> * it to target. This means however that up to 15 bytes are written to and invalid </span>
<a name="l00044"></a>00044 <span class="comment"> * location, so if one wants to use it with invalid sizes precautions have to be taken </span>
<a name="l00045"></a>00045 <span class="comment"> * in order to make it safe.</span>
<a name="l00046"></a>00046 <span class="comment"> * </span>
<a name="l00047"></a>00047 <span class="comment"> * @param source \b in ls-address of data</span>
<a name="l00048"></a>00048 <span class="comment"> * @param target \b in ea-address of buffer</span>
<a name="l00049"></a>00049 <span class="comment"> * @param size \b in size of data in byte</span>
<a name="l00050"></a>00050 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00051"></a>00051 <span class="comment"> **/</span>
<a name="l00052"></a>00052 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gb48c58191a7cf4d3e502d1c7a6c0ab9c" title="Internal wrapper-function for a blocking DMA-put operation.">IMOC_put_data</a>(<span class="keywordtype">void</span>* source, uint64_t target, uint32_t size);
<a name="l00053"></a>00053 <span class="comment"></span>
<a name="l00054"></a>00054 <span class="comment">/**</span>
<a name="l00055"></a>00055 <span class="comment"> * Internal wrapper-function for a non-blocking DMA-get operation.</span>
<a name="l00056"></a>00056 <span class="comment"> * Data can be of any size, constraints of low-level DMA-functions</span>
<a name="l00057"></a>00057 <span class="comment"> * are dealt by this function.</span>
<a name="l00058"></a>00058 <span class="comment"> * However data-addresses have to be at least 16-byte aligned.</span>
<a name="l00059"></a>00059 <span class="comment"> * </span>
<a name="l00060"></a>00060 <span class="comment"> * This function actually always reads a multiple of 16 from the source, </span>
<a name="l00061"></a>00061 <span class="comment"> * but copies only size bytes of it to target. This means however that up</span>
<a name="l00062"></a>00062 <span class="comment"> * to 15 bytes are read from an invalid location. As it is never written to</span>
<a name="l00063"></a>00063 <span class="comment"> * them this should always be safe. </span>
<a name="l00064"></a>00064 <span class="comment"> * </span>
<a name="l00065"></a>00065 <span class="comment"> * @param target \b in ls-address of buffer</span>
<a name="l00066"></a>00066 <span class="comment"> * @param source \b in ea-address of data</span>
<a name="l00067"></a>00067 <span class="comment"> * @param size \b in size of data in byte</span>
<a name="l00068"></a>00068 <span class="comment"> * @param request \b out request-handle</span>
<a name="l00069"></a>00069 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00070"></a>00070 <span class="comment"> **/</span>
<a name="l00071"></a>00071 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g0c76eeaa08ac299e19dc2758d4142cd9" title="Internal wrapper-function for a non-blocking DMA-get operation.">IMOC_iget_data</a>(<span class="keywordtype">void</span>* target, uint64_t source, uint32_t size, <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request);
<a name="l00072"></a>00072 <span class="comment"></span>
<a name="l00073"></a>00073 <span class="comment">/**</span>
<a name="l00074"></a>00074 <span class="comment"> * Internal wrapper-function for a blocking DMA-put operation.</span>
<a name="l00075"></a>00075 <span class="comment"> * Data-size should be a multiple of 16 because of low-level constraints, but </span>
<a name="l00076"></a>00076 <span class="comment"> * there is no upper limit of transfer-size.</span>
<a name="l00077"></a>00077 <span class="comment"> * Data-addresses have to be at least 16-byte aligned.</span>
<a name="l00078"></a>00078 <span class="comment"> * </span>
<a name="l00079"></a>00079 <span class="comment"> * This function actually always reads a multiple of 16 from the source, and copies </span>
<a name="l00080"></a>00080 <span class="comment"> * it to target. This means however that up to 15 bytes are written to and invalid </span>
<a name="l00081"></a>00081 <span class="comment"> * location, so if one wants to use it with invalid sizes precautions have to be taken </span>
<a name="l00082"></a>00082 <span class="comment"> * in order to make it safe.</span>
<a name="l00083"></a>00083 <span class="comment"> * </span>
<a name="l00084"></a>00084 <span class="comment"> * @param source \b in ls-address of data</span>
<a name="l00085"></a>00085 <span class="comment"> * @param target \b in ea-address of buffer</span>
<a name="l00086"></a>00086 <span class="comment"> * @param size \b in size of data in byte</span>
<a name="l00087"></a>00087 <span class="comment"> * @param request \b out request-handle</span>
<a name="l00088"></a>00088 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00089"></a>00089 <span class="comment"> **/</span>
<a name="l00090"></a>00090 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gc181bb2e3eb058990534c71355af3443" title="Internal wrapper-function for a non-blocking DMA-put operation.">IMOC_iput_data</a>(<span class="keywordtype">void</span>* source, uint64_t target, uint32_t size, <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request);
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="comment"></span>
<a name="l00093"></a>00093 <span class="comment">/**</span>
<a name="l00094"></a>00094 <span class="comment"> * Waits till a IMOC_iget_data or IMOC_iput_data is completed.</span>
<a name="l00095"></a>00095 <span class="comment"> * </span>
<a name="l00096"></a>00096 <span class="comment"> * @param request \b in request-handle</span>
<a name="l00097"></a>00097 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00098"></a>00098 <span class="comment"> **/</span>
<a name="l00099"></a>00099 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad" title="Waits till a IMOC_iget_data or IMOC_iput_data is completed.">IMOC_wait_dma</a>(<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request);
<a name="l00100"></a>00100 <span class="comment"></span>
<a name="l00101"></a>00101 <span class="comment">/**</span>
<a name="l00102"></a>00102 <span class="comment"> * Tests if a IMOC_iget_data or IMOC_iput_data is completed.</span>
<a name="l00103"></a>00103 <span class="comment"> * </span>
<a name="l00104"></a>00104 <span class="comment"> * @param request \b in request-handle</span>
<a name="l00105"></a>00105 <span class="comment"> * @param flag \b out true if operation is completed</span>
<a name="l00106"></a>00106 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00107"></a>00107 <span class="comment"> **/</span>
<a name="l00108"></a>00108 <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0" title="Tests if a IMOC_iget_data or IMOC_iput_data is completed.">IMOC_test_dma</a>(<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request, <span class="keywordtype">int</span> *flag);
<a name="l00109"></a>00109
<a name="l00110"></a>00110
<a name="l00111"></a>00111
<a name="l00112"></a>00112 <span class="comment"></span>
<a name="l00113"></a>00113 <span class="comment">//@}</span>
<a name="l00114"></a>00114 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00115"></a>00115 <span class="comment"></span><span class="preprocessor">#endif </span><span class="comment">/*MOC_INTERNAL_GET_DATA_H_*/</span>
</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&nbsp;
<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>
+223
View File
@@ -0,0 +1,223 @@
<!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): include/internal/imoc.h 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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/internal/imoc.h</h1><a href="../../d9/db3/imoc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef IMOC_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define IMOC_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00006"></a>00006
<a name="l00007"></a>00007 <span class="preprocessor">#include "../moc.h"</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="../../d7/d3d/imoc__core_8h.html">imoc_core.h</a>"</span>
<a name="l00009"></a>00009
<a name="l00010"></a>00010
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment">/**</span>
<a name="l00013"></a>00013 <span class="comment"> * \addtogroup internal_p2p_imm</span>
<a name="l00014"></a>00014 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">//@{</span>
<a name="l00016"></a>00016 <span class="comment"></span><span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">/**</span>
<a name="l00018"></a>00018 <span class="comment"> * @name Constants for MOC_Request.request_type</span>
<a name="l00019"></a>00019 <span class="comment"> */</span><span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">//@{</span>
<a name="l00021"></a>00021 <span class="comment"></span><span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment">/**</span>
<a name="l00023"></a>00023 <span class="comment"> * MOC_Request is associated with a DMA-Communication.</span>
<a name="l00024"></a>00024 <span class="comment"> **/</span>
<a name="l00025"></a><a class="code" href="../../d7/d41/group__internal__p2p__imm.html#gb4f3aa7dbf7ddfbc4a612fda560ec03b">00025</a> <span class="preprocessor">#define MOC_REQ_TYPE_DMA 0</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00027"></a>00027 <span class="comment">/**</span>
<a name="l00028"></a>00028 <span class="comment"> * MOC_Request is associated with aISsend-Communication.</span>
<a name="l00029"></a>00029 <span class="comment"> **/</span>
<a name="l00030"></a><a class="code" href="../../d7/d41/group__internal__p2p__imm.html#g755884e41591a0d838f45b04f3a92ab9">00030</a> <span class="preprocessor">#define MOC_REQ_TYPE_ISSEND 1</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00032"></a>00032 <span class="comment">//@}</span>
<a name="l00033"></a>00033 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00034"></a>00034 <span class="comment"></span><span class="comment"></span>
<a name="l00035"></a>00035 <span class="comment">/**</span>
<a name="l00036"></a>00036 <span class="comment"> * \addtogroup internal_p2p_main</span>
<a name="l00037"></a>00037 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">//@{</span>
<a name="l00039"></a>00039 <span class="comment"></span><span class="comment"></span>
<a name="l00040"></a>00040 <span class="comment">/**</span>
<a name="l00041"></a>00041 <span class="comment"> * @name Internal constants</span>
<a name="l00042"></a>00042 <span class="comment"> */</span><span class="comment"></span>
<a name="l00043"></a>00043 <span class="comment">//@{</span>
<a name="l00044"></a>00044 <span class="comment"></span><span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">/**</span>
<a name="l00046"></a>00046 <span class="comment"> * Defines a treshold, when to use memcpy and when to use DMA in a get-operation</span>
<a name="l00047"></a>00047 <span class="comment"> * on the PPU.</span>
<a name="l00048"></a>00048 <span class="comment"> **/</span>
<a name="l00049"></a><a class="code" href="../../d8/d88/group__internal__p2p__main.html#ge9f5f9bdfa51d7683fbe312d4a667afd">00049</a> <span class="preprocessor">#define MEMCPY_GET_TRESHOLD 156</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00051"></a>00051 <span class="comment">/**</span>
<a name="l00052"></a>00052 <span class="comment"> * Defines a treshold, when to use memcpy and when to use DMA in a put-operation</span>
<a name="l00053"></a>00053 <span class="comment"> * on the PPU.</span>
<a name="l00054"></a>00054 <span class="comment"> **/</span>
<a name="l00055"></a><a class="code" href="../../d8/d88/group__internal__p2p__main.html#g928a3b77f3303eca97315e8133c2f634">00055</a> <span class="preprocessor">#define MEMCPY_PUT_TRESHOLD 2210</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00057"></a>00057 <span class="comment">//@}</span>
<a name="l00058"></a>00058 <span class="comment"></span><span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">/**</span>
<a name="l00060"></a>00060 <span class="comment"> * @name Internal shared functions</span>
<a name="l00061"></a>00061 <span class="comment"> */</span><span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">//@{</span>
<a name="l00063"></a>00063 <span class="comment"></span><span class="comment"></span>
<a name="l00064"></a>00064 <span class="comment">/**</span>
<a name="l00065"></a>00065 <span class="comment"> * Get the next valid message-envelope from "source" with specified "tag" and "comm".</span>
<a name="l00066"></a>00066 <span class="comment"> *</span>
<a name="l00067"></a>00067 <span class="comment"> * @param source \b in rank of sending node</span>
<a name="l00068"></a>00068 <span class="comment"> * @param tag \b in message-tag</span>
<a name="l00069"></a>00069 <span class="comment"> * @param comm \b in message-communicator</span>
<a name="l00070"></a>00070 <span class="comment"> * @param isSpecial \b in true to return special-message</span>
<a name="l00071"></a>00071 <span class="comment"> * @param status \b inout MOC_status-instance to add some information (e.g. source by MOC_ANY_SOURCE)</span>
<a name="l00072"></a>00072 <span class="comment"> * @returns pointer to the appropriate message-queue-entry.</span>
<a name="l00073"></a>00073 <span class="comment"> **/</span>
<a name="l00074"></a>00074 <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>* <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g8980da77fa506e9a6d503c8c6eba68e2" title="Get the next valid message-envelope from &amp;quot;source&amp;quot; with specified &amp;quot;tag&amp;quot;...">IMOC_get_entry</a>(<span class="keywordtype">int</span> source, <span class="keywordtype">int</span> tag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> isSpecial, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="comment"></span>
<a name="l00077"></a>00077 <span class="comment">/**</span>
<a name="l00078"></a>00078 <span class="comment"> * Get next free entry in message-queue (a local copy of the message-queue has to be used).</span>
<a name="l00079"></a>00079 <span class="comment"> * To ensure correct ordering message-tag and -comm and -type has to be specified.</span>
<a name="l00080"></a>00080 <span class="comment"> *</span>
<a name="l00081"></a>00081 <span class="comment"> * @param pqueue \b in pointer to local copy of remote message-queue</span>
<a name="l00082"></a>00082 <span class="comment"> * @param tag \b in message-tag</span>
<a name="l00083"></a>00083 <span class="comment"> * @param comm \b in message-communicator</span>
<a name="l00084"></a>00084 <span class="comment"> * @param isSpecial \b in true if message should be a special message</span>
<a name="l00085"></a>00085 <span class="comment"> * @param index \b out index of free entry</span>
<a name="l00086"></a>00086 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00087"></a>00087 <span class="comment"> **/</span>
<a name="l00088"></a>00088 <span class="keywordtype">int</span> <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message-queue (a local copy of the message-queue has to be...">IMOC_getFreeEntry</a> ( <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>* pqueue, uint8_t tag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> isSpecial, <span class="keywordtype">int</span>* index );
<a name="l00089"></a>00089 <span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">/**</span>
<a name="l00091"></a>00091 <span class="comment"> * Get free message-ID.</span>
<a name="l00092"></a>00092 <span class="comment"> *</span>
<a name="l00093"></a>00093 <span class="comment"> * \note Message-ID is index of message-status-array</span>
<a name="l00094"></a>00094 <span class="comment"> *</span>
<a name="l00095"></a>00095 <span class="comment"> * @param mid \b out free message-ID</span>
<a name="l00096"></a>00096 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00097"></a>00097 <span class="comment"> * @retval MOC_ERR_MESSAGE_EXHAUSTED No further messages possible.</span>
<a name="l00098"></a>00098 <span class="comment"> **/</span>
<a name="l00099"></a>00099 <span class="keywordtype">int</span> <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message-ID.">IMOC_getFreeMID</a> ( <span class="keywordtype">int</span> *mid );
<a name="l00100"></a>00100 <span class="comment"></span>
<a name="l00101"></a>00101 <span class="comment">/**</span>
<a name="l00102"></a>00102 <span class="comment"> * Wait till message with message-ID mid has been received.</span>
<a name="l00103"></a>00103 <span class="comment"> *</span>
<a name="l00104"></a>00104 <span class="comment"> * Waits till message-status-flag 'outstanding' is 0.</span>
<a name="l00105"></a>00105 <span class="comment"> *</span>
<a name="l00106"></a>00106 <span class="comment"> * @param mid \b in message-ID</span>
<a name="l00107"></a>00107 <span class="comment"> * @return 0 when success otherwise error-code</span>
<a name="l00108"></a>00108 <span class="comment"> **/</span>
<a name="l00109"></a>00109 <span class="keywordtype">int</span> <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g8675f9552168f2dd8926cad5ac00be69" title="Wait till message with message-ID mid has been received.">IMOC_waitForMessageCompletion</a> ( uint8_t mid );
<a name="l00110"></a>00110 <span class="comment"></span>
<a name="l00111"></a>00111 <span class="comment">/**</span>
<a name="l00112"></a>00112 <span class="comment"> * Tests if message with message-ID mid has been received.</span>
<a name="l00113"></a>00113 <span class="comment"> *</span>
<a name="l00114"></a>00114 <span class="comment"> * Tests if message-status-flag 'outstanding' is 0.</span>
<a name="l00115"></a>00115 <span class="comment"> *</span>
<a name="l00116"></a>00116 <span class="comment"> * @param mid \b in message-ID</span>
<a name="l00117"></a>00117 <span class="comment"> * @param status \b out status of message</span>
<a name="l00118"></a>00118 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00119"></a>00119 <span class="comment"> **/</span>
<a name="l00120"></a>00120 <span class="keywordtype">int</span> <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2e74930cd8e161a131b90f2f1081037a" title="Tests if message with message-ID mid has been received.">IMOC_testForMessageCompletion</a> ( uint8_t mid, uint8_t *status );
<a name="l00121"></a>00121 <span class="comment"></span>
<a name="l00122"></a>00122 <span class="comment">//@}</span>
<a name="l00123"></a>00123 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00124"></a>00124 <span class="comment"></span>
<a name="l00125"></a>00125
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="comment"></span>
<a name="l00128"></a>00128 <span class="comment">/**</span>
<a name="l00129"></a>00129 <span class="comment"> * \addtogroup internal_error</span>
<a name="l00130"></a>00130 <span class="comment"> *</span>
<a name="l00131"></a>00131 <span class="comment"> * This section deals with error-messages.</span>
<a name="l00132"></a>00132 <span class="comment"> *</span>
<a name="l00133"></a>00133 <span class="comment"> * An array of type \ref error_strings_struct stores error-messages and</span>
<a name="l00134"></a>00134 <span class="comment"> * their corresponding error-codes. \ref MOC_Error_string searches this</span>
<a name="l00135"></a>00135 <span class="comment"> * list for a given error-code and returns the error-message.</span>
<a name="l00136"></a>00136 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00137"></a>00137 <span class="comment">//@{</span>
<a name="l00138"></a>00138 <span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment"></span>
<a name="l00140"></a>00140 <span class="comment">/**</span>
<a name="l00141"></a>00141 <span class="comment"> * Error-Strings structure.</span>
<a name="l00142"></a>00142 <span class="comment"> *</span>
<a name="l00143"></a>00143 <span class="comment"> * stores the error-string to a given error-code</span>
<a name="l00144"></a>00144 <span class="comment"> **/</span>
<a name="l00145"></a><a class="code" href="../../dd/dfe/structerror__strings__struct.html">00145</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../dd/dfe/structerror__strings__struct.html" title="Error-Strings structure.">error_strings_struct</a>
<a name="l00146"></a>00146 {
<a name="l00147"></a><a class="code" href="../../dd/dfe/structerror__strings__struct.html#2378b8fb9f1758d8bb537743980b4906">00147</a> <span class="keywordtype">int</span> <a class="code" href="../../dd/dfe/structerror__strings__struct.html#2378b8fb9f1758d8bb537743980b4906" title="error-code">error_code</a>; <span class="comment">/**&lt; error-code */</span>
<a name="l00148"></a><a class="code" href="../../dd/dfe/structerror__strings__struct.html#5b8c2fd5c217e1514a2ca23a642325dd">00148</a> <span class="keywordtype">char</span> * <a class="code" href="../../dd/dfe/structerror__strings__struct.html#5b8c2fd5c217e1514a2ca23a642325dd" title="error-text">text</a>; <span class="comment">/**&lt; error-text */</span>
<a name="l00149"></a>00149 } <a class="code" href="../../dd/dfe/structerror__strings__struct.html" title="Error-Strings structure.">error_strings_t</a>; <span class="comment">/**&lt; typedef for \ref error_strings_struct */</span>
<a name="l00150"></a>00150
<a name="l00151"></a>00151 <span class="comment"></span>
<a name="l00152"></a>00152 <span class="comment">//@}</span>
<a name="l00153"></a>00153 <span class="comment"></span>
<a name="l00154"></a>00154
<a name="l00155"></a>00155 <span class="comment"></span>
<a name="l00156"></a>00156 <span class="comment">/**</span>
<a name="l00157"></a>00157 <span class="comment"> * \addtogroup internal_p2p_bmalloc</span>
<a name="l00158"></a>00158 <span class="comment"> *</span>
<a name="l00159"></a>00159 <span class="comment"> * Information about already allocated buffer-space is stored in the</span>
<a name="l00160"></a>00160 <span class="comment"> * status-array. But this information has no order which forces us</span>
<a name="l00161"></a>00161 <span class="comment"> * everytime we want to allocate buffer-space to create an ordered list</span>
<a name="l00162"></a>00162 <span class="comment"> * of already allocated buffer-space. To avoid this we have additionally</span>
<a name="l00163"></a>00163 <span class="comment"> * an ordered linked-list. This list orders the indexes (== message-IDs)</span>
<a name="l00164"></a>00164 <span class="comment"> * of the status-array-entries in ascending order of the memory-addresses.</span>
<a name="l00165"></a>00165 <span class="comment"> * This enables fast searching for free buffer-space.</span>
<a name="l00166"></a>00166 <span class="comment"> *</span>
<a name="l00167"></a>00167 <span class="comment"> * Allocated buffer-space is cleared by the receiving process by setting</span>
<a name="l00168"></a>00168 <span class="comment"> * the appropriate flag in the status-array-entry. This is done by a</span>
<a name="l00169"></a>00169 <span class="comment"> * DMA-Transfer and so no collaboration of the sending-process is needed.</span>
<a name="l00170"></a>00170 <span class="comment"> * During the next allocation of buffer-space nodes with disabled buffer-flags</span>
<a name="l00171"></a>00171 <span class="comment"> * are freed.</span>
<a name="l00172"></a>00172 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00173"></a>00173 <span class="comment">//@{</span>
<a name="l00174"></a>00174 <span class="comment"></span>
<a name="l00175"></a>00175
<a name="l00176"></a>00176 <span class="comment"></span>
<a name="l00177"></a>00177 <span class="comment">/**</span>
<a name="l00178"></a>00178 <span class="comment"> * Node of linked list holding information about allocated buffer-space.</span>
<a name="l00179"></a>00179 <span class="comment"> **/</span>
<a name="l00180"></a><a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html">00180</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_struct</a>
<a name="l00181"></a>00181 {
<a name="l00182"></a><a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679">00182</a> <span class="keyword">struct </span><a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_struct</a> *<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679" title="Pointer to next entry.">next_node</a>; <span class="comment">/**&lt; Pointer to</span>
<a name="l00183"></a>00183 <span class="comment"> next entry **/</span>
<a name="l00184"></a><a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e">00184</a> uint8_t <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a>; <span class="comment">/**&lt; Message-ID of message using buffer-space.</span>
<a name="l00185"></a>00185 <span class="comment"> Information about the used buffer-space is stored in the</span>
<a name="l00186"></a>00186 <span class="comment"> appropriate message-status-entry (mid is index of entry). **/</span>
<a name="l00187"></a>00187 } <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>;
<a name="l00188"></a>00188
<a name="l00189"></a>00189
<a name="l00190"></a>00190 <span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">/**</span>
<a name="l00192"></a>00192 <span class="comment"> * Allocate buffer-space.</span>
<a name="l00193"></a>00193 <span class="comment"> *</span>
<a name="l00194"></a>00194 <span class="comment"> * @param size \b in size of buffer-space</span>
<a name="l00195"></a>00195 <span class="comment"> * @param mid \b in corresponding message-ID</span>
<a name="l00196"></a>00196 <span class="comment"> * @return effective address of allocated buffer-space (16-byte aligned)</span>
<a name="l00197"></a>00197 <span class="comment"> **/</span>
<a name="l00198"></a>00198 uint64_t <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41" title="Allocate buffer-space.">IMOC_bmalloc</a> ( uint32_t size, uint8_t <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a> );
<a name="l00199"></a>00199 <span class="comment"></span>
<a name="l00200"></a>00200 <span class="comment">//@}</span>
<a name="l00201"></a>00201 <span class="comment"></span><span class="preprocessor">#endif </span><span class="comment">/*IMOC_H_*/</span>
</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&nbsp;
<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>
@@ -0,0 +1,173 @@
<!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): imoc_dma_request_struct Struct Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li class="current"><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>imoc_dma_request_struct Struct Reference</h1><!-- doxytag: class="imoc_dma_request_struct" --><code>#include &lt;<a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for imoc_dma_request_struct:</div>
<div class="dynsection">
<p><center><img src="../../d7/dc3/structimoc__dma__request__struct__coll__graph.png" border="0" usemap="#d2/dbc/imoc__dma__request__struct__coll__map" alt="Collaboration graph"></center>
<center><font size="2">[<a target="top" href="../../graph_legend.html">legend</a>]</font></center></div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00059">59</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">target</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#f81a1887a3f1aa7f965e1fb15e2220de">dest</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="efdb405d93fc52fbe483551e3bbaafac"></a><!-- doxytag: member="imoc_dma_request_struct::buffer" ref="efdb405d93fc52fbe483551e3bbaafac" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">imoc_dma_request_struct::buffer</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00061">61</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, and <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>.</p>
</div>
</div><p>
<a class="anchor" name="aab928f79935740e686706a1296b01a9"></a><!-- doxytag: member="imoc_dma_request_struct::target" ref="aab928f79935740e686706a1296b01a9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">imoc_dma_request_struct::target</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00062">62</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../dd/d07/imoc__dma-iput__ppu_8c-source.html#l00019">IMOC_iput_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, and <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>.</p>
</div>
</div><p>
<a class="anchor" name="8322ab9ff0dbd0be788bf765f3e85e94"></a><!-- doxytag: member="imoc_dma_request_struct::size" ref="8322ab9ff0dbd0be788bf765f3e85e94" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">imoc_dma_request_struct::size</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00063">63</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../dd/d07/imoc__dma-iput__ppu_8c-source.html#l00019">IMOC_iput_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>, <a class="el" href="../../d7/d24/moc__test_8c-source.html#l00013">MOC_Test()</a>, and <a class="el" href="../../de/d33/moc__wait_8c-source.html#l00011">MOC_Wait()</a>.</p>
</div>
</div><p>
<a class="anchor" name="e9940544a153813fd1284eaa8883a1f2"></a><!-- doxytag: member="imoc_dma_request_struct::remainder" ref="e9940544a153813fd1284eaa8883a1f2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">imoc_dma_request_struct::remainder</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00064">64</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../dd/d07/imoc__dma-iput__ppu_8c-source.html#l00019">IMOC_iput_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, and <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>.</p>
</div>
</div><p>
<a class="anchor" name="f81a1887a3f1aa7f965e1fb15e2220de"></a><!-- doxytag: member="imoc_dma_request_struct::dest" ref="f81a1887a3f1aa7f965e1fb15e2220de" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#f81a1887a3f1aa7f965e1fb15e2220de">imoc_dma_request_struct::dest</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00065">65</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../dd/d07/imoc__dma-iput__ppu_8c-source.html#l00019">IMOC_iput_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, and <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>.</p>
</div>
</div><p>
<a class="anchor" name="93345f8438f78d7a0309b4b0b0670476"></a><!-- doxytag: member="imoc_dma_request_struct::tag_id" ref="93345f8438f78d7a0309b4b0b0670476" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">imoc_dma_request_struct::tag_id</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00066">66</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d6/df6/imoc__dma-iget__ppu_8c-source.html#l00010">IMOC_iget_data()</a>, <a class="el" href="../../dd/d07/imoc__dma-iput__ppu_8c-source.html#l00019">IMOC_iput_data()</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, and <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>.</p>
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:18 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
@@ -0,0 +1,89 @@
<!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/spu/internal/dma/imoc_dma-iget_spu.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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/spu/internal/dma/imoc_dma-iget_spu.c</h1><a href="../../d7/daf/imoc__dma-iget__spu_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 &lt;spu_mfcio.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../dd/d9c/moc__dma__spu_8h.html">spu/moc_dma_spu.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="../../d4/dce/imoc__dma__spu_8h.html">internal/spu/imoc_dma_spu.h</a>&gt;</span>
<a name="l00009"></a>00009
<a name="l00010"></a><a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g928d605bbb172de96e44517820b59278">00010</a> <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g0c76eeaa08ac299e19dc2758d4142cd9" title="Internal wrapper-function for a non-blocking DMA-get operation.">IMOC_iget_data</a>(<span class="keywordtype">void</span>* target, uint64_t source, uint32_t size,
<a name="l00011"></a>00011 <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 uint32_t remainder_16b;
<a name="l00014"></a>00014 uint32_t remainder_16kb;
<a name="l00015"></a>00015 uint32_t offset;
<a name="l00016"></a>00016 uint32_t tag_id;
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00019"></a>00019 {
<a name="l00020"></a>00020 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00021"></a>00021 }
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <span class="comment">/* transfers have to be multiples of 16 bytes */</span>
<a name="l00024"></a>00024 remainder_16b = size % 16;
<a name="l00025"></a>00025
<a name="l00026"></a>00026 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a> = 0;
<a name="l00027"></a>00027 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a> = size;
<a name="l00028"></a>00028 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">target</a> = target;
<a name="l00029"></a>00029 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a> = tag_id;
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="comment">/* subtracting remainder means the transfer has a valid size now */</span>
<a name="l00032"></a>00032 size -= remainder_16b;
<a name="l00033"></a>00033 offset = 0;
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment">/* first case: transfer of size smaller than maximum allowed one (16kbyte) */</span>
<a name="l00036"></a>00036 <span class="keywordflow">if</span> (size &lt;= <a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141" title="Maximum byte-count which can be transferred by one DMA-transfer.">MAX_DMA_CALL_SIZE</a>)
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038 mfc_get(target, source, size, tag_id, 0, 0);
<a name="l00039"></a>00039 }
<a name="l00040"></a>00040 <span class="comment">/* second case: transfer of bigger size is simply split into parts of 16kb */</span>
<a name="l00041"></a>00041 <span class="keywordflow">else</span>
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 remainder_16kb = size % <a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141" title="Maximum byte-count which can be transferred by one DMA-transfer.">MAX_DMA_CALL_SIZE</a>;
<a name="l00044"></a>00044 <span class="keywordflow">while</span> (offset + <a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141" title="Maximum byte-count which can be transferred by one DMA-transfer.">MAX_DMA_CALL_SIZE</a> &lt;= size)
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 mfc_get(target + offset, source + offset, <a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141" title="Maximum byte-count which can be transferred by one DMA-transfer.">MAX_DMA_CALL_SIZE</a>,
<a name="l00047"></a>00047 tag_id, 0, 0);
<a name="l00048"></a>00048 offset += <a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141" title="Maximum byte-count which can be transferred by one DMA-transfer.">MAX_DMA_CALL_SIZE</a>;
<a name="l00049"></a>00049 }
<a name="l00050"></a>00050 <span class="keywordflow">if</span> (remainder_16kb &gt; 0)
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 mfc_get(target + offset, source + offset, remainder_16kb, tag_id,
<a name="l00053"></a>00053 0, 0);
<a name="l00054"></a>00054 }
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 <span class="comment">/* if size was reduced previously the remaining bytes have to be transfered */</span>
<a name="l00057"></a>00057 <span class="keywordflow">if</span> (remainder_16b &gt; 0)
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a> = (<span class="keywordtype">char</span>*) malloc(16 * <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));
<a name="l00060"></a>00060 <span class="comment">/* minimum allowed transfer is 16bytes so transfer this size into a buffer */</span>
<a name="l00061"></a>00061 mfc_get(request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a>, source + size, 16, tag_id, 0, 0);
<a name="l00062"></a>00062 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a> = remainder_16b;
<a name="l00063"></a>00063 }
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00066"></a>00066 }
<a name="l00067"></a>00067
</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&nbsp;
<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>
@@ -0,0 +1,129 @@
<!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/ppu/communication/moc_ssend_ppu.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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/ppu/communication/moc_ssend_ppu.c</h1><a href="../../d2/d00/moc__ssend__ppu_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 &lt;stdio.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00003"></a>00003
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../d8/d98/imoc__macros__ppu_8h.html">internal/ppu/imoc_macros_ppu.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../de/df9/imoc__dma__ppu_8h.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>&gt;</span>
<a name="l00009"></a>00009
<a name="l00010"></a><a class="code" href="../../d5/dc2/group__p2p__synch.html#g46cb2ff2b5a0601165978598932d6120">00010</a> <span class="keywordtype">int</span> <a class="code" href="../../d5/dc2/group__p2p__synch.html#g46cb2ff2b5a0601165978598932d6120" title="Performs a blocking synchronous mode send operation.">MOC_Ssend</a>(<span class="keywordtype">void</span>* buf, <span class="keywordtype">int</span> count, <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> datatype, <span class="keywordtype">int</span> dest, <span class="keywordtype">int</span> tag,
<a name="l00011"></a>00011 <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 <span class="keywordtype">int</span> queue_index, msg_id, bytecount, err;
<a name="l00014"></a>00014 <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a> queue_copy[<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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a>] <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&amp;quot;No nodes in list\n&amp;quot;);...">__attribute__</a>((__aligned__(16)));
<a name="l00015"></a>00015
<a name="l00016"></a>00016 uint32_t dmastatus;
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00019"></a>00019 bytecount = count;
<a name="l00020"></a>00020 <span class="keywordflow">else</span>
<a name="l00021"></a>00021 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <a class="code" href="../../d3/d32/group__internal__tm.html#g615b65fb3c3ad16711686a178ac7d1c3" title="Tests if rank is MOC_PROC_NULL and returns with MOC_SUCCESS itself.">IMOC_TEST_PROC_NULL</a>(dest)
<a name="l00024"></a>00024 <a class="code" href="../../d3/d32/group__internal__tm.html#gf902b6e1cbe077abf0f8d02a488fec8a" title="Tests if rank is own rank and returns with MOC_SUCCESS itself.">IMOC_TEST_PROC_SELF</a>(dest)
<a name="l00025"></a>00025 <a class="code" href="../../d3/d32/group__internal__tm.html#g8026463e106a01cc8efb816d7dc1036a" title="Tests if invalid byte-count in a recv-operation.">IMOC_TEST_BYTECOUNT</a>(bytecount)
<a name="l00026"></a>00026 <span class="comment">// if there is no data, permit Null-Buffer-Pointer</span>
<a name="l00027"></a>00027 <span class="keywordflow">if</span> (bytecount != 0)
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029 <a class="code" href="../../d3/d32/group__internal__tm.html#g52f61fd7f3253d10b740a9fc792052c6" title="Tests if invalid buffer-pointer.">IMOC_TEST_BUFFER</a>(buf)
<a name="l00030"></a>00030 }
<a name="l00031"></a>00031 <a class="code" href="../../d3/d32/group__internal__tm.html#g1dfddaa8f7d9aad32b00248c7dc782d2" title="Tests if invalid rank.">IMOC_TEST_RANK</a>(dest)
<a name="l00032"></a>00032 <a class="code" href="../../d3/d32/group__internal__tm.html#g49637a9f588e1c44584d8def5c45e811" title="Tests if invalid tag in a send-operation.">IMOC_TEST_TAG_SEND</a>(tag)
<a name="l00033"></a>00033 <a class="code" href="../../d3/d32/group__internal__tm.html#gfc07f5e570f47525b80a1f3e5a36b3b3" title="Tests if invalid communicator in a send-operation.">IMOC_TEST_COMM_SEND</a>(comm)
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment">/* Get queue from remote-node, choose fastest method depending on transfer-size */</span>
<a name="l00036"></a>00036 <span class="keywordflow">if</span> (<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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a> * <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>)
<a name="l00037"></a>00037 &gt; <a class="code" href="../../d8/d88/group__internal__p2p__main.html#ge9f5f9bdfa51d7683fbe312d4a667afd" title="Defines a treshold, when to use memcpy and when to use DMA in a get-operation on...">MEMCPY_GET_TRESHOLD</a>)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 err = spe_mfcio_put(
<a name="l00040"></a>00040 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[dest - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>].speid,
<a name="l00041"></a>00041 <a class="code" href="../../df/ddf/group__internal__am.html#g48013d236aaa37226bbba460eaf3aca5" title="LS-Address of own remote queue at node &amp;#39;rank&amp;#39;.">IMOC_LS_REMOTE_QUEUE</a>(dest), queue_copy, <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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a>
<a name="l00042"></a>00042 * <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>), 15, 0, 0);
<a name="l00043"></a>00043 <span class="keywordflow">if</span> (err)
<a name="l00044"></a>00044 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00045"></a>00045 err = spe_mfcio_tag_status_read(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[dest
<a name="l00046"></a>00046 - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>].speid, 0, SPE_TAG_ALL, &amp;dmastatus);
<a name="l00047"></a>00047 <span class="keywordflow">if</span> (err)
<a name="l00048"></a>00048 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
<a name="l00049"></a>00049 }
<a name="l00050"></a>00050 <span class="keywordflow">else</span>
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 memcpy(queue_copy, (<span class="keywordtype">void</span>*) <a class="code" href="../../df/ddf/group__internal__am.html#gf02c3d971a2b5e72d22c9c16b1748c04" title="Effective base-address of own remote queue at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE</a>(dest),
<a name="l00053"></a>00053 <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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a> * <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>));
<a name="l00054"></a>00054 }
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">/* search free entry in message-queue */</span>
<a name="l00057"></a>00057 err = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message-queue (a local copy of the message-queue has to be...">IMOC_getFreeEntry</a>(queue_copy, tag, comm, 0, &amp;queue_index);
<a name="l00058"></a>00058 <span class="keywordflow">if</span> (err)
<a name="l00059"></a>00059 <span class="keywordflow">return</span> err;
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="comment">/* search free message-ID */</span>
<a name="l00062"></a>00062 err = <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message-ID.">IMOC_getFreeMID</a>(&amp;msg_id);
<a name="l00063"></a>00063 <span class="keywordflow">if</span> (err)
<a name="l00064"></a>00064 <span class="keywordflow">return</span> err;
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="comment">/* small messages are directly sent instead of their address */</span>
<a name="l00067"></a>00067 <span class="keywordflow">if</span> (bytecount &lt;= 8)
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069 queue_copy[queue_index].flags.bits.channel = <a class="code" href="../../dd/df8/group__internal__core.html#g1a3153033a1eaac0ddff04deac271947" title="Constant for moc_message_envelope_t.flags.channel.">IMOC_MESSAGE_CHANNEL_ENV</a>;
<a name="l00070"></a>00070 <span class="comment">// synchronous send waits till the message has been received (meaning</span>
<a name="l00071"></a>00071 <span class="comment">// recv has copied the message), so we need a signal-back.</span>
<a name="l00072"></a>00072 queue_copy[queue_index].flags.bits.signal_back = 1;
<a name="l00073"></a>00073 queue_copy[queue_index].flags.bits.in_mm = 0;
<a name="l00074"></a>00074 memcpy(&amp;queue_copy[queue_index].message_address, buf, bytecount);
<a name="l00075"></a>00075 }
<a name="l00076"></a>00076 <span class="keywordflow">else</span>
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 <a class="code" href="../../d3/d32/group__internal__tm.html#gc89a1f53869fe90c838a714621e20d88" title="Tests if address is 16-byte aligned.">IMOC_TEST_ALIGNMENT</a>(buf)
<a name="l00079"></a>00079 queue_copy[queue_index].flags.bits.channel = <a class="code" href="../../dd/df8/group__internal__core.html#gda23ff5baabe186f8c37c0424598c7bc" title="Constant for moc_message_envelope_t.flags.channel.">IMOC_MESSAGE_CHANNEL_DMA</a>;
<a name="l00080"></a>00080 queue_copy[queue_index].flags.bits.signal_back = 1;
<a name="l00081"></a>00081 queue_copy[queue_index].flags.bits.in_mm = 1;
<a name="l00082"></a>00082 queue_copy[queue_index].message_address = (uint64_t) buf;
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="comment">/* fill missing message-envelope-entries */</span>
<a name="l00086"></a>00086 queue_copy[queue_index].communicator = comm;
<a name="l00087"></a>00087 queue_copy[queue_index].datatype = datatype;
<a name="l00088"></a>00088 queue_copy[queue_index].id = msg_id;
<a name="l00089"></a>00089 queue_copy[queue_index].size = bytecount;
<a name="l00090"></a>00090 queue_copy[queue_index].tag = tag;
<a name="l00091"></a>00091 queue_copy[queue_index].flags.bits.collaborative = 0;
<a name="l00092"></a>00092 queue_copy[queue_index].flags.bits.special = 0;
<a name="l00093"></a>00093 queue_copy[queue_index].flags.bits.valid = 1;
<a name="l00094"></a>00094 queue_copy[queue_index].flags.bits.keep_valid = 0;
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="comment">/* fill message-status-entry */</span>
<a name="l00097"></a>00097 <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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a>[msg_id].<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed" title="flag-union">flags</a>.<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512" title="flag-struct">bits</a>.valid = 1;
<a name="l00098"></a>00098 <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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a>[msg_id].<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed" title="flag-union">flags</a>.<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512" title="flag-struct">bits</a>.outstanding = 1;
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="comment">/* write message-envelope into queue, because transfer-size is always 16-byte,</span>
<a name="l00101"></a>00101 <span class="comment"> * memcpy is fastest method */</span>
<a name="l00102"></a>00102 memcpy((<span class="keywordtype">void</span>*) <a class="code" href="../../df/ddf/group__internal__am.html#gf9ad028ccbfa406c49a0ebd943486698" title="Effective base-address of own remote queue-entry at node &amp;#39;rank&amp;#39;.">IMOC_EA_REMOTE_QUEUE_ENTRY</a>(dest, queue_index),
<a name="l00103"></a>00103 &amp;queue_copy[queue_index], <span class="keyword">sizeof</span>(<a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>));
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <a class="code" href="../../d8/d88/group__internal__p2p__main.html#g8675f9552168f2dd8926cad5ac00be69" title="Wait till message with message-ID mid has been received.">IMOC_waitForMessageCompletion</a>(msg_id);
<a name="l00106"></a>00106 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00107"></a>00107 }
</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&nbsp;
<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>
+72
View File
@@ -0,0 +1,72 @@
<!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): include/internal/spu/imoc_dma_spu.h File Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>include/internal/spu/imoc_dma_spu.h File Reference</h1>
<p>
<code>#include &lt;stdint.h&gt;</code><br>
<code>#include &quot;<a class="el" href="../../d7/de1/moc_8h-source.html">../../moc.h</a>&quot;</code><br>
<p>
<div class="dynheader">
Include dependency graph for imoc_dma_spu.h:</div>
<div class="dynsection">
<p><center><img src="../../d0/d02/imoc__dma__spu_8h__incl.png" border="0" usemap="#include/internal/spu/imoc_dma_spu.h_map" alt=""></center>
<map name="include/internal/spu/imoc_dma_spu.h_map">
<area shape="rect" href="../../d1/d82/moc_8h.html" title="../../moc.h" alt="" coords="139,80,219,107"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="moc_datatype.h" alt="" coords="156,155,271,181"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="295,155,425,181"></map>
</div>
<p>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
<p><center><img src="../../d1/d93/imoc__dma__spu_8h__dep__incl.png" border="0" usemap="#include/internal/spu/imoc_dma_spu.hdep_map" alt=""></center>
<map name="include/internal/spu/imoc_dma_spu.hdep_map">
<area shape="rect" href="../../d6/d8c/moc__bsend__spu_8c.html" title="src/spu/communication/moc_bsend_spu.c" alt="" coords="5,80,272,107"><area shape="rect" href="../../de/d76/moc__issend__spu_8c.html" title="src/spu/communication/moc_issend_spu.c" alt="" coords="296,80,565,107"><area shape="rect" href="../../d9/dab/moc__recv__spu_8c.html" title="src/spu/communication/moc_recv_spu.c" alt="" coords="589,80,843,107"><area shape="rect" href="../../d3/d71/moc__ssend__spu_8c.html" title="src/spu/communication/moc_ssend_spu.c" alt="" coords="867,80,1133,107"><area shape="rect" href="../../d8/d91/moc__dma-get__spu_8c.html" title="src/spu/dma/moc_dma&#45;get_spu.c" alt="" coords="1157,80,1373,107"><area shape="rect" href="../../da/dea/moc__dma-iget__spu_8c.html" title="src/spu/dma/moc_dma&#45;iget_spu.c" alt="" coords="1397,80,1616,107"><area shape="rect" href="../../dc/de8/moc__dma-iput__spu_8c.html" title="src/spu/dma/moc_dma&#45;iput_spu.c" alt="" coords="1640,80,1859,107"><area shape="rect" href="../../df/ddc/moc__dma-put__spu_8c.html" title="src/spu/dma/moc_dma&#45;put_spu.c" alt="" coords="1883,80,2099,107"><area shape="rect" href="../../d8/d15/moc__dma-test__spu_8c.html" title="src/spu/dma/moc_dma&#45;test_spu.c" alt="" coords="2123,80,2341,107"><area shape="rect" href="../../d2/d14/moc__dma-wait__spu_8c.html" title="src/spu/dma/moc_dma&#45;wait_spu.c" alt="" coords="2365,80,2584,107"><area shape="rect" href="../../d5/d1c/imoc__dma-get__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;get_spu.c" alt="" coords="2608,80,2872,107"><area shape="rect" href="../../d7/daf/imoc__dma-iget__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;iget_spu.c" alt="" coords="2896,80,3163,107"><area shape="rect" href="../../d8/d30/imoc__dma-iput__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;iput_spu.c" alt="" coords="3187,80,3453,107"><area shape="rect" href="../../da/db1/imoc__dma-put__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;put_spu.c" alt="" coords="3477,80,3741,107"><area shape="rect" href="../../d1/dc4/imoc__dma-test__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;test_spu.c" alt="" coords="3765,80,4032,107"><area shape="rect" href="../../db/d38/imoc__dma-wait__spu_8c.html" title="src/spu/internal/dma/imoc_dma&#45;wait_spu.c" alt="" coords="4056,80,4325,107"></map>
</div>
<p>
<a href="../../d4/d95/imoc__dma__spu_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">SPU-only</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#g026790f4f64135c54c4e61c08925344c">IMOC_get_data</a> (void *target, uint64_t source, uint32_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a blocking DMA-get operation. <a href="../../d2/de2/group__internal__p2p__dma.html#g026790f4f64135c54c4e61c08925344c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#gbcda581536f49d62ee307da5cddc150e">IMOC_put_data</a> (void *source, uint64_t target, uint32_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a blocking DMA-put operation. <a href="../../d2/de2/group__internal__p2p__dma.html#gbcda581536f49d62ee307da5cddc150e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#g928d605bbb172de96e44517820b59278">IMOC_iget_data</a> (void *target, uint64_t source, uint32_t size, <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a non-blocking DMA-get operation. <a href="../../d2/de2/group__internal__p2p__dma.html#g928d605bbb172de96e44517820b59278"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#ga362f58242dfec61a0a9efb4f3c7ffcb">IMOC_iput_data</a> (void *source, uint64_t target, uint32_t size, <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a blocking DMA-put operation. <a href="../../d2/de2/group__internal__p2p__dma.html#ga362f58242dfec61a0a9efb4f3c7ffcb"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">PPU-only</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad">IMOC_wait_dma</a> (<a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Waits till a IMOC_iget_data or IMOC_iput_data is completed. <a href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0">IMOC_test_dma</a> (<a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request, int *flag)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests if a IMOC_iget_data or IMOC_iput_data is completed. <a href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:55 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
@@ -0,0 +1,226 @@
<!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): include/doxygen_pages.doxygen 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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/doxygen_pages.doxygen</h1><a href="../../da/d63/doxygen__pages_8doxygen.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">/**</span>
<a name="l00004"></a>00004 <span class="comment"> * \page restrictions Restrictions of the Cell-Architecture</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * \par</span>
<a name="l00007"></a>00007 <span class="comment"> * \section res_arch CBE Architecture</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * There are some restriction caused by the CBE architecture. Programming a SPU can be</span>
<a name="l00010"></a>00010 <span class="comment"> * compared to programming a microcontroller:</span>
<a name="l00011"></a>00011 <span class="comment"> * \li \b Small \b local-store \b of \b SPUs: Only 256 KByte of local-store are available</span>
<a name="l00012"></a>00012 <span class="comment"> * on a SPU which is moreover shared by data and instructions. Because of this a economic</span>
<a name="l00013"></a>00013 <span class="comment"> * stewardship of available resources is needed.</span>
<a name="l00014"></a>00014 <span class="comment"> * \li \b No \b underlying \b OS: The operation system is running on the PPU, but not on</span>
<a name="l00015"></a>00015 <span class="comment"> * the SPUs. Although the OS also manages the SPUs, there are some things which</span>
<a name="l00016"></a>00016 <span class="comment"> * are missing or have to be done in a very performance decreasing and complex way.</span>
<a name="l00017"></a>00017 <span class="comment"> * E.g. there is no support for several threads on one SPU (unless you program it yourself)</span>
<a name="l00018"></a>00018 <span class="comment"> * and most of the system-calls are delegated to the PPU.</span>
<a name="l00019"></a>00019 <span class="comment"> * \li \b Limited \b I/O-Capabilities: File-operations are only possible on the PPU. So if you</span>
<a name="l00020"></a>00020 <span class="comment"> * want to store data of an SPU into a file, you have to send it to the PPU who then stores</span>
<a name="l00021"></a>00021 <span class="comment"> * the data into a file. Main-memory is managed by the PPU and the SPUs can only read</span>
<a name="l00022"></a>00022 <span class="comment"> * from or write into the main-memory. Allocation of main-memory has to be done by the PPU.</span>
<a name="l00023"></a>00023 <span class="comment"> *</span>
<a name="l00024"></a>00024 <span class="comment"> *</span>
<a name="l00025"></a>00025 <span class="comment"> * \par</span>
<a name="l00026"></a>00026 <span class="comment"> * \section res_alignment Memory-Alignment</span>
<a name="l00027"></a>00027 <span class="comment"> *</span>
<a name="l00028"></a>00028 <span class="comment"> * All Buffers used in send- or receive-functions have to be aligned at a 16-byte boundary</span>
<a name="l00029"></a>00029 <span class="comment"> * (for better performance a 128-byte alignment is recommended). This restriction cannot be</span>
<a name="l00030"></a>00030 <span class="comment"> * circumvented.</span>
<a name="l00031"></a>00031 <span class="comment"> *</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * \par</span>
<a name="l00034"></a>00034 <span class="comment"> * \section res_size Transfer-Size</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
<a name="l00036"></a>00036 <span class="comment"> * DMA-calls only transfer data in chunks of 16 bytes. Send-receive operations and</span>
<a name="l00037"></a>00037 <span class="comment"> * DMA-get-operations provided by this library hide this restriction by the use of intermediate</span>
<a name="l00038"></a>00038 <span class="comment"> * buffers. But you should keep this restriction in mind because to gain maximum performance</span>
<a name="l00039"></a>00039 <span class="comment"> * the size of data to be transfered should be a multiple of 16 bytes.</span>
<a name="l00040"></a>00040 <span class="comment"> *</span>
<a name="l00041"></a>00041 <span class="comment"> *</span>
<a name="l00042"></a>00042 <span class="comment"> *</span>
<a name="l00043"></a>00043 <span class="comment"> **/</span>
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment"></span>
<a name="l00046"></a>00046 <span class="comment">/**</span>
<a name="l00047"></a>00047 <span class="comment"> * \page violations Violations of the MPI-Standard</span>
<a name="l00048"></a>00048 <span class="comment"> *</span>
<a name="l00049"></a>00049 <span class="comment"> * \par</span>
<a name="l00050"></a>00050 <span class="comment"> * \section viol_prefix Prefix of functions:</span>
<a name="l00051"></a>00051 <span class="comment"> *</span>
<a name="l00052"></a>00052 <span class="comment"> * The prefix of functions and data-structures is not 'MPI_' as stated by the MPI-standard.</span>
<a name="l00053"></a>00053 <span class="comment"> * Instead it is 'MOC_' to allow the usage of another MPI-Library (e.g. to connect several</span>
<a name="l00054"></a>00054 <span class="comment"> * playstations) and to stress that this implementation is not fully conform with the</span>
<a name="l00055"></a>00055 <span class="comment"> * MPI-standard.</span>
<a name="l00056"></a>00056 <span class="comment"> *</span>
<a name="l00057"></a>00057 <span class="comment"> *</span>
<a name="l00058"></a>00058 <span class="comment"> * \par</span>
<a name="l00059"></a>00059 <span class="comment"> * \section viol_startup Application Startup</span>
<a name="l00060"></a>00060 <span class="comment"> *</span>
<a name="l00061"></a>00061 <span class="comment"> * MPI-applications (Version 1.3) are started using mpiexec/mpirun and normally only one</span>
<a name="l00062"></a>00062 <span class="comment"> * binary is executed on all MPI-nodes. Because PPU- and SPU-instructions aren't compatible</span>
<a name="l00063"></a>00063 <span class="comment"> * at least two executables (and two compilers) are needed. Also SPU-threads have to be initialized</span>
<a name="l00064"></a>00064 <span class="comment"> * and started by the PPU. Because of this the SPU-binaries are embedded into the PPU-binary</span>
<a name="l00065"></a>00065 <span class="comment"> * and started by this PPU-binary during runtime.</span>
<a name="l00066"></a>00066 <span class="comment"> * In this library this concept is also used. So you have to program at least one PPU- and one</span>
<a name="l00067"></a>00067 <span class="comment"> * SPU-program, embed the SPU-program into the PPU-executable and add the SPU-program-handle to</span>
<a name="l00068"></a>00068 <span class="comment"> * the MOC-environment (see \ref MOC_Add_spu_thread) during runtime before calling MOC_Init.</span>
<a name="l00069"></a>00069 <span class="comment"> *</span>
<a name="l00070"></a>00070 <span class="comment"> *</span>
<a name="l00071"></a>00071 <span class="comment"> * \par</span>
<a name="l00072"></a>00072 <span class="comment"> * \section viol_queue Order of received messages:</span>
<a name="l00073"></a>00073 <span class="comment"> *</span>
<a name="l00074"></a>00074 <span class="comment"> * Because of the internal design of this implementation the order of</span>
<a name="l00075"></a>00075 <span class="comment"> * incoming messages cannot be preserved in all cases. Currently the</span>
<a name="l00076"></a>00076 <span class="comment"> * correct order is only preserved from messages from the same source,</span>
<a name="l00077"></a>00077 <span class="comment"> * with the same message-tag and same communicator.</span>
<a name="l00078"></a>00078 <span class="comment"> *</span>
<a name="l00079"></a>00079 <span class="comment"> *</span>
<a name="l00080"></a>00080 <span class="comment"> * \par</span>
<a name="l00081"></a>00081 <span class="comment"> * \section viol_tag Number of usable message-tag</span>
<a name="l00082"></a>00082 <span class="comment"> *</span>
<a name="l00083"></a>00083 <span class="comment"> * According to the MPI-standard there should be at least 32767 tags available. But to save</span>
<a name="l00084"></a>00084 <span class="comment"> * memory we use only one byte to encode the message-tag. So there are only 256 usable</span>
<a name="l00085"></a>00085 <span class="comment"> * message-tags. Message-tags greater than 249 are reserved for internal purposes.</span>
<a name="l00086"></a>00086 <span class="comment"> *</span>
<a name="l00087"></a>00087 <span class="comment"> *</span>
<a name="l00088"></a>00088 <span class="comment"> * \par</span>
<a name="l00089"></a>00089 <span class="comment"> * \section viol_nr_pending Number of simultaneous pending send-receive operations</span>
<a name="l00090"></a>00090 <span class="comment"> *</span>
<a name="l00091"></a>00091 <span class="comment"> * According to the MPI-standard there should be hardly any limitations in the number of</span>
<a name="l00092"></a>00092 <span class="comment"> * possible simultaneous transfers. It is stated that only in pathological cases the maximum</span>
<a name="l00093"></a>00093 <span class="comment"> * of possible outstanding transfers should be reached. Because the resources of an SPU are</span>
<a name="l00094"></a>00094 <span class="comment"> * very limited our implementation has a tight limit of possible simultaneous transfers.</span>
<a name="l00095"></a>00095 <span class="comment"> * Although the upper-limit can be changed using \ref MOC_Set_queue_size, it is limited by</span>
<a name="l00096"></a>00096 <span class="comment"> * the 256 KByte of local-storage of a SPU.</span>
<a name="l00097"></a>00097 <span class="comment"> * There is also a limit of the number of simultaneous DMA-calls, because for each DMA-operation</span>
<a name="l00098"></a>00098 <span class="comment"> * an exclusive DMA-tag is used and there are only 32 DMA-tag (on the PPU only 15) available.</span>
<a name="l00099"></a>00099 <span class="comment"> *</span>
<a name="l00100"></a>00100 <span class="comment"> * \par</span>
<a name="l00101"></a>00101 <span class="comment"> * \section viol_init MPI_Init:</span>
<a name="l00102"></a>00102 <span class="comment"> *</span>
<a name="l00103"></a>00103 <span class="comment"> * The parameters of the init-function for the SPU does not match the parameters</span>
<a name="l00104"></a>00104 <span class="comment"> * defined by the MPI-standard (see \ref moc_init_spu "MOC_Init (SPU)")</span>
<a name="l00105"></a>00105 <span class="comment"> *</span>
<a name="l00106"></a>00106 <span class="comment"> *</span>
<a name="l00107"></a>00107 <span class="comment"> **/</span>
<a name="l00108"></a>00108
<a name="l00109"></a>00109 <span class="comment"></span>
<a name="l00110"></a>00110 <span class="comment">/**</span>
<a name="l00111"></a>00111 <span class="comment"> * \page performance Performance Measurements</span>
<a name="l00112"></a>00112 <span class="comment"> *</span>
<a name="l00113"></a>00113 <span class="comment"> * The measurements were taken on a Playstation 3 running Yellow Dog Linux release 6.0</span>
<a name="l00114"></a>00114 <span class="comment"> * using Cell SDK 3.1. To measure send-receive operations ping-pongs were used and to</span>
<a name="l00115"></a>00115 <span class="comment"> * measure DMA-calls the time till the used DMA-tag is marked to have no pending calls</span>
<a name="l00116"></a>00116 <span class="comment"> * is used. The stated latencies in the pictures above are one-way latencies.</span>
<a name="l00117"></a>00117 <span class="comment"> *</span>
<a name="l00118"></a>00118 <span class="comment"> * \section perf_send_recv Send-Receive performance</span>
<a name="l00119"></a>00119 <span class="comment"> *</span>
<a name="l00120"></a>00120 <span class="comment"> * The following two figures show latency and bandwidth achieved by our implementation.</span>
<a name="l00121"></a>00121 <span class="comment"> * The theoretical maximum bandwidth is 25 GByte/s and synchronous send between SPUs is</span>
<a name="l00122"></a>00122 <span class="comment"> * at a close range to this limit if the data-size is large enough. There is also a big</span>
<a name="l00123"></a>00123 <span class="comment"> * difference between SPU-SPU and SPU-PPU operations. The reason for this is the fact that</span>
<a name="l00124"></a>00124 <span class="comment"> * the PPU cannot handle DMA-operations itself but only remote-control the SPU's</span>
<a name="l00125"></a>00125 <span class="comment"> * Memory Flow Controller. And as you will see later the main-memory performance of the PPU</span>
<a name="l00126"></a>00126 <span class="comment"> * is much lower than that of the SPUs. Because we use ping-pongs there is no way to</span>
<a name="l00127"></a>00127 <span class="comment"> * determine differences in sending from or to the PPU, but other measurements indicate</span>
<a name="l00128"></a>00128 <span class="comment"> * such differences.</span>
<a name="l00129"></a>00129 <span class="comment"> *</span>
<a name="l00130"></a>00130 <span class="comment"> * \image html latency-kb.png</span>
<a name="l00131"></a>00131 <span class="comment"> *</span>
<a name="l00132"></a>00132 <span class="comment"> * \image html bandwidth-kb.png</span>
<a name="l00133"></a>00133 <span class="comment"> *</span>
<a name="l00134"></a>00134 <span class="comment"> * The following figure shows the latency of send-receive operations at a lower scale than</span>
<a name="l00135"></a>00135 <span class="comment"> * the first figure. If you look at the latency of synchronous send operations then you can</span>
<a name="l00136"></a>00136 <span class="comment"> * see that there is a big start-up latency and only a very small data-size dependend latency.</span>
<a name="l00137"></a>00137 <span class="comment"> * So there's only a very small time-difference between sending 10 byte and 1 Kbyte, but there</span>
<a name="l00138"></a>00138 <span class="comment"> * is naturally a difference in throughput.</span>
<a name="l00139"></a>00139 <span class="comment"> *</span>
<a name="l00140"></a>00140 <span class="comment"> * \image html latency-b.png</span>
<a name="l00141"></a>00141 <span class="comment"> *</span>
<a name="l00142"></a>00142 <span class="comment"> * \section perf_moc_vs_dma Send-Recv vs. DMA performance</span>
<a name="l00143"></a>00143 <span class="comment"> *</span>
<a name="l00144"></a>00144 <span class="comment"> * The following two figures demonstrate the difference in performance of send-recv operations</span>
<a name="l00145"></a>00145 <span class="comment"> * and DMA-calls. The performance of DMA-calls reaches it's peak much earlier than send-recv</span>
<a name="l00146"></a>00146 <span class="comment"> * and the peak-value is higher than that of send-recv even though the difference is not much.</span>
<a name="l00147"></a>00147 <span class="comment"> * So DMA is a lot faster than send-recv especially for small messages, but for big messages</span>
<a name="l00148"></a>00148 <span class="comment"> * the difference is much lower. It seems that it is always better to use DMA, but keep in mind</span>
<a name="l00149"></a>00149 <span class="comment"> * that in practical applications calculation time easily exceeds communication time.</span>
<a name="l00150"></a>00150 <span class="comment"> *</span>
<a name="l00151"></a>00151 <span class="comment"> * \image html dma-vs-moc-lat.png</span>
<a name="l00152"></a>00152 <span class="comment"> *</span>
<a name="l00153"></a>00153 <span class="comment"> * \image html dma-vs-moc-bw.png</span>
<a name="l00154"></a>00154 <span class="comment"> *</span>
<a name="l00155"></a>00155 <span class="comment"> * \section perf_spu_vs_ppu SPU- vs PPU-initiated transfer</span>
<a name="l00156"></a>00156 <span class="comment"> *</span>
<a name="l00157"></a>00157 <span class="comment"> * The following figure shows the difference between SPU- and PPU-initiated DMA-calls.</span>
<a name="l00158"></a>00158 <span class="comment"> * As you can see the highest performance can be achieved by using SPU-SPU DMA-calls. There</span>
<a name="l00159"></a>00159 <span class="comment"> * is also hardly any difference between put and get operations. DMA-operations between SPU and</span>
<a name="l00160"></a>00160 <span class="comment"> * main-memory achieves lower performance and there is a difference between put and get</span>
<a name="l00161"></a>00161 <span class="comment"> * operations. PPU to SPU DMA calls have the lowest performance with small transfer sizes, but</span>
<a name="l00162"></a>00162 <span class="comment"> * if the transfer-size is big enough they are faster than SPU-main-memory transfers.</span>
<a name="l00163"></a>00163 <span class="comment"> * The lowest performance has a memcopy on the PPU, which also explains the bad performance of</span>
<a name="l00164"></a>00164 <span class="comment"> * buffered send between SPU and PPU.</span>
<a name="l00165"></a>00165 <span class="comment"> *</span>
<a name="l00166"></a>00166 <span class="comment"> * \image html spu-ppu-dma-bw-kb.png</span>
<a name="l00167"></a>00167 <span class="comment"> *</span>
<a name="l00168"></a>00168 <span class="comment"> * \section perf_mem DMA vs. memcpy</span>
<a name="l00169"></a>00169 <span class="comment"> *</span>
<a name="l00170"></a>00170 <span class="comment"> * The official Cell documentation states that it is also possible to use</span>
<a name="l00171"></a>00171 <span class="comment"> * memcpy to transfer data from the PPU to a SPU. However one should use</span>
<a name="l00172"></a>00172 <span class="comment"> * DMA, because it is always faster.</span>
<a name="l00173"></a>00173 <span class="comment"> * If you look at the following figure, this is not always true. If the</span>
<a name="l00174"></a>00174 <span class="comment"> * data-size is small enough memcpy is faster.</span>
<a name="l00175"></a>00175 <span class="comment"> *</span>
<a name="l00176"></a>00176 <span class="comment"> * \image html ppu-transfer-bw-b.png</span>
<a name="l00177"></a>00177 <span class="comment"> *</span>
<a name="l00178"></a>00178 <span class="comment"> **/</span>
<a name="l00179"></a>00179
<a name="l00180"></a>00180
<a name="l00181"></a>00181 <span class="comment"></span>
<a name="l00182"></a>00182 <span class="comment">/**</span>
<a name="l00183"></a>00183 <span class="comment"> * \page conclusion Summary &amp; Conclusions</span>
<a name="l00184"></a>00184 <span class="comment"> *</span>
<a name="l00185"></a>00185 <span class="comment"> * \details MPI wasn't designed for the Cell Broadband Engine. A common MPI-node has one or more</span>
<a name="l00186"></a>00186 <span class="comment"> * normal CPUs and several GBytes of RAM. The Cell Broadband Engine features a normal CPU</span>
<a name="l00187"></a>00187 <span class="comment"> * (the PPU) and several special processing units with only a very limited amount</span>
<a name="l00188"></a>00188 <span class="comment"> * of memory. The SPUs support only one thread per SPU and a complex handling of system-calls</span>
<a name="l00189"></a>00189 <span class="comment"> * is needed. Because of this there are several restrictions in implementing MPI on the Cell</span>
<a name="l00190"></a>00190 <span class="comment"> * Broadband Engine.</span>
<a name="l00191"></a>00191 <span class="comment"> *</span>
<a name="l00192"></a>00192 <span class="comment"> * Nevertheless MPI on Cell makes sense. It greatly simlifies programming on the Cell Broadband</span>
<a name="l00193"></a>00193 <span class="comment"> * Engine, features a public API which is well known and widely used and message passing operations</span>
<a name="l00194"></a>00194 <span class="comment"> * are generally easier to use than DMA (DMA needs memory-addresses and explicit synchronization,</span>
<a name="l00195"></a>00195 <span class="comment"> * whereas MPI only needs the ranks of participating processes and features implicit</span>
<a name="l00196"></a>00196 <span class="comment"> * synchronization).</span>
<a name="l00197"></a>00197 <span class="comment"> *</span>
<a name="l00198"></a>00198 <span class="comment"> * But message parsing operations cannot replace DMA. Both methods of communication have their</span>
<a name="l00199"></a>00199 <span class="comment"> * advantages and disadvantages and they complement one another. So this library additionally</span>
<a name="l00200"></a>00200 <span class="comment"> * features some easy to use DMA operations, if someone wants to gain maximum performance. Using</span>
<a name="l00201"></a>00201 <span class="comment"> * DMA alltogether with send-recv especially speeds up application with a lot of communication</span>
<a name="l00202"></a>00202 <span class="comment"> * going on between SPUs and PPU.</span>
<a name="l00203"></a>00203 <span class="comment"> **/</span>
<a name="l00204"></a>00204
</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&nbsp;
<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>
+92
View File
@@ -0,0 +1,92 @@
<!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/spu/system/moc_init_spu.c File Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/spu/system/moc_init_spu.c File Reference</h1>
<p>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;malloc_align.h&gt;</code><br>
<code>#include &lt;free_align.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;spu_mfcio.h&gt;</code><br>
<code>#include &lt;<a class="el" href="../../db/dd9/imoc__core__spu_8h-source.html">internal/spu/imoc_core_spu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d4/d9b/imoc_8h-source.html">internal/imoc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">spu/moc.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for moc_init_spu.c:</div>
<div class="dynsection">
<p><center><img src="../../d5/d44/moc__init__spu_8c__incl.png" border="0" usemap="#src/spu/system/moc_init_spu.c_map" alt=""></center>
<map name="src/spu/system/moc_init_spu.c_map">
<area shape="rect" href="../../d9/d00/imoc__core__spu_8h.html" title="internal/spu/imoc_core_spu.h" alt="" coords="876,155,1068,181"><area shape="rect" href="../../d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="745,155,852,181"><area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="spu/moc.h" alt="" coords="619,80,701,107"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="903,229,1007,256"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="676,229,745,256"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="moc_datatype.h" alt="" coords="457,304,572,331"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="647,304,777,331"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="553,155,671,181"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="439,229,580,256"></map>
</div>
<p>
<a href="../../de/d9d/moc__init__spu_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/de2/moc__init__spu_8c.html#ee36daffc6d5276cabe2b44afeb35ece">MOC_Init</a> (unsigned long long argp __attribute__((unused)), int length __attribute__((unused)), void *buffer __attribute__((unused)))</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ee36daffc6d5276cabe2b44afeb35ece"></a><!-- doxytag: member="moc_init_spu.c::MOC_Init" ref="ee36daffc6d5276cabe2b44afeb35ece" args="(unsigned long long argp __attribute__((unused)), int length __attribute__((unused)), void *buffer __attribute__((unused)))" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Init </td>
<td>(</td>
<td class="paramtype">unsigned long long argp &nbsp;</td>
<td class="paramname"> <em>__attribute__</em>(unused), </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int length &nbsp;</td>
<td class="paramname"> <em>__attribute__</em>(unused), </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *buffer &nbsp;</td>
<td class="paramname"> <em>__attribute__</em>(unused)</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="../../de/d9d/moc__init__spu_8c-source.html#l00012">12</a> of file <a class="el" href="../../de/d9d/moc__init__spu_8c-source.html">moc_init_spu.c</a>.</p>
<p>References <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00037">moc_node_handle_ppu_struct::buffer_base</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00038">moc_node_handle_ppu_struct::buffer_size</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00033">moc_node_handle_ppu_struct::comm_size</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00035">moc_node_handle_ppu_struct::message_queue_base</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00047">MOC_ERR_INTERN</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00063">MOC_ERR_NO_MEMORY</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00040">moc_node_handle_ppu_struct::moc_process_list</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00034">moc_node_handle_ppu_struct::queue_size</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00032">moc_node_handle_ppu_struct::rank</a>, and <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00036">moc_node_handle_ppu_struct::status_array_base</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:42 2009 for MPI On Cell (Documentation) by&nbsp;
<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>
@@ -0,0 +1,11 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="291,80,347,107">
<area shape="rect" href="$d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="572,155,679,181">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="421,80,576,107">
<area shape="rect" href="$d4/dce/imoc__dma__spu_8h.html" title="internal/spu/imoc_dma_spu.h" alt="" coords="356,155,548,181">
<area shape="rect" href="$d9/d00/imoc__core__spu_8h.html" title="internal/spu/imoc_core_spu.h" alt="" coords="703,155,895,181">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="164,155,281,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="91,229,232,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="307,229,376,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="107,304,232,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="357,304,488,331">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="613,229,704,256">
@@ -0,0 +1 @@
87f56c177b26b610808d2aa0b899fe42
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@@ -0,0 +1,36 @@
<!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/ppu/dma/moc_dma-wait_ppu.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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>src/ppu/dma/moc_dma-wait_ppu.c</h1><a href="../../d6/de5/moc__dma-wait__ppu_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 &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;<a class="code" href="../../de/df9/imoc__dma__ppu_8h.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;<a class="code" href="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.h</a>&gt;</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="comment">/*</span>
<a name="l00007"></a>00007 <span class="comment"> * wrapper function for IMOC_test_dma so that the syntax is more in line and more intutive use of MOC_Request instead of</span>
<a name="l00008"></a>00008 <span class="comment"> * of imoc_dma_request is possible</span>
<a name="l00009"></a>00009 <span class="comment"> */</span>
<a name="l00010"></a>00010
<a name="l00011"></a><a class="code" href="../../d9/d16/group__dma__access.html#g0ba7b00fbebaabb8b39737a7c13efc67">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g0ba7b00fbebaabb8b39737a7c13efc67" title="Waits till a MOC_IGet_data or IMOC_IPut_data is completed.">MOC_Wait_data</a>(<a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a>* request)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 <span class="keywordflow">return</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad" title="Waits till a IMOC_iget_data or IMOC_iput_data is completed.">IMOC_wait_dma</a>(&amp;(request-&gt;<a class="code" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">request_data</a>.<a class="code" href="../../db/d17/structmoc__request__struct.html#b2b561710b814f4804bce54568b67cfe">dma_data</a>));
<a name="l00014"></a>00014 }
</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&nbsp;
<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>
@@ -0,0 +1,8 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="193,80,249,107">
<area shape="rect" href="$d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="348,155,455,181">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="67,155,184,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="72,229,213,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="237,229,307,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="72,304,197,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="272,304,403,331">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="477,304,568,331">
@@ -0,0 +1 @@
18b885d6ec7d0fa3d2ce64577b33201c
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

+48
View File
@@ -0,0 +1,48 @@
<!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/communication/moc_wait.c File Reference</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&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/noarch/communication/moc_wait.c File Reference</h1>
<p>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">moc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d4/d9b/imoc_8h-source.html">internal/imoc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html">internal/ppu/imoc_core_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../de/de1/imoc__dma__ppu_8h-source.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for moc_wait.c:</div>
<div class="dynsection">
<p><center><img src="../../d1/d36/moc__wait_8c__incl.png" border="0" usemap="#src/noarch/communication/moc_wait.c_map" alt=""></center>
<map name="src/noarch/communication/moc_wait.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="329,155,385,181"><area shape="rect" href="../../d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="21,229,128,256"><area shape="rect" href="../../d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="497,80,689,107"><area shape="rect" href="../../de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="885,229,1077,256"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="203,229,320,256"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="232,304,373,331"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="397,304,467,331"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="387,379,512,405"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="232,379,363,405"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="67,304,157,331"><area shape="rect" href="../../db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="597,155,704,181"><area shape="rect" href="../../db/d62/moc__dma__ppu_8h.html" title="moc_dma_ppu.h" alt="" coords="496,229,613,256"><area shape="rect" href="../../d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="491,304,632,331"></map>
</div>
<p>
<a href="../../de/d33/moc__wait_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d62/group__p2p__imm.html#g68043e4a0893fdc25c67f87bae1015a6">MOC_Wait</a> (<a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *request, <a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait till a non-blocking communication has been completed. <a href="../../d7/d62/group__p2p__imm.html#g68043e4a0893fdc25c67f87bae1015a6"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:09 2009 for MPI On Cell (Documentation) by&nbsp;
<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>