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,122 @@
<!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-iput_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/internal/dma/imoc_dma-iput_ppu.c</h1><a href="../../df/d10/imoc__dma-iput__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;string.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdlib.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="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.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>00010 <span class="comment">/*</span>
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment"> * This function actually always reads a multiple of 16 from the source, and copies it to target.</span>
<a name="l00013"></a>00013 <span class="comment"> * This means however that up to 15 bytes are written to and invalid location, so if one wants to</span>
<a name="l00014"></a>00014 <span class="comment"> * use it with such sizes precautions have to be taken in order to make it safe.</span>
<a name="l00015"></a>00015 <span class="comment"> * On the ppu the system for tag reservation is not present, so a hardcoded tag is used.</span>
<a name="l00016"></a>00016 <span class="comment"> * It has also to be noted that the dma calls are actually initiated on the spu by the ppu.</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018
<a name="l00019"></a><a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gc181bb2e3eb058990534c71355af3443">00019</a> <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, uint32_t dest,
<a name="l00020"></a>00020 <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>* request)
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 uint32_t remainder_16b;
<a name="l00023"></a>00023 uint32_t remainder_16kb;
<a name="l00024"></a>00024 uint32_t offset;
<a name="l00025"></a>00025 <span class="keywordtype">int</span> err;
<a name="l00026"></a>00026 <span class="keywordtype">int</span> tag_id;
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="keywordflow">if</span> ((tag_id = <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g29d3bf9879af70f97d63e774a5aa4d33" title="Reserves a tag on the ppu, for communication with a given spu.">moc_tag_reserve</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>)) &lt; 0)
<a name="l00029"></a>00029 {
<a name="l00030"></a>00030 <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="l00031"></a>00031 }
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="comment">/* transfers have to be multiples of 16 bytes */</span>
<a name="l00034"></a>00034 remainder_16b = size % 16;
<a name="l00035"></a>00035
<a name="l00036"></a>00036 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a> = 0;
<a name="l00037"></a>00037 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#f81a1887a3f1aa7f965e1fb15e2220de">dest</a> = dest;
<a name="l00038"></a>00038 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a> = size;
<a name="l00039"></a>00039 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">target</a> = target;
<a name="l00040"></a>00040 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a> = tag_id;
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="comment">/* subtracting remainder means the transfer has a valid size now */</span>
<a name="l00043"></a>00043 size -= remainder_16b;
<a name="l00044"></a>00044 offset = 0;
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="comment">/* first case: transfer of size smaller than maximum allowed one (16kbyte) */</span>
<a name="l00047"></a>00047 <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="l00048"></a>00048 {
<a name="l00049"></a>00049 err = spe_mfcio_get(
<a name="l00050"></a>00050 <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, target,
<a name="l00051"></a>00051 source, size, tag_id, 0, 0);
<a name="l00052"></a>00052
<a name="l00053"></a>00053 <span class="keywordflow">if</span> (err)
<a name="l00054"></a>00054 <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="l00055"></a>00055 }
<a name="l00056"></a>00056
<a name="l00057"></a>00057 <span class="comment">/* second case: transfer of bigger size is simply split into parts of 16kb */</span>
<a name="l00058"></a>00058 <span class="keywordflow">else</span>
<a name="l00059"></a>00059 {
<a name="l00060"></a>00060 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="l00061"></a>00061 <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="l00062"></a>00062 {
<a name="l00063"></a>00063 err = spe_mfcio_get(
<a name="l00064"></a>00064 <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="l00065"></a>00065 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="l00066"></a>00066 tag_id, 0, 0);
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="keywordflow">if</span> (err)
<a name="l00069"></a>00069 <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="l00070"></a>00070
<a name="l00071"></a>00071 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="l00072"></a>00072 }
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="keywordflow">if</span> (remainder_16kb &gt; 0)
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076 err = spe_mfcio_get(
<a name="l00077"></a>00077 <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="l00078"></a>00078 target + offset, source + offset, remainder_16kb, tag_id,
<a name="l00079"></a>00079 0, 0);
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="keywordflow">if</span> (err)
<a name="l00082"></a>00082 <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="l00083"></a>00083 }
<a name="l00084"></a>00084 }
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="comment">/* if size was reduced previously the remaining bytes have to be transfered */</span>
<a name="l00087"></a>00087 <span class="keywordflow">if</span> (remainder_16b &gt; 0)
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <span class="comment">/* minimum allowed transfer is 16bytes so transfer this size */</span>
<a name="l00090"></a>00090 err = spe_mfcio_get(
<a name="l00091"></a>00091 <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, target
<a name="l00092"></a>00092 + size, source + size, 16, tag_id, 0, 0);
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="keywordflow">if</span> (err)
<a name="l00095"></a>00095 <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="l00096"></a>00096 }
<a name="l00097"></a>00097
<a name="l00098"></a>00098 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00099"></a>00099
<a name="l00100"></a>00100 }
</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,34 @@
<!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/system/moc_get_proc_name_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/system/moc_get_proc_name_ppu.c</h1><a href="../../da/ddb/moc__get__proc__name__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
<a name="l00003"></a><a class="code" href="../../d8/d8f/group__environment__information.html#gf69e7617a61a2eaa2783e718f2df5270">00003</a> <span class="keywordtype">int</span> <a class="code" href="../../d8/d8f/group__environment__information.html#gf69e7617a61a2eaa2783e718f2df5270" title="Gets the name of the processor.">MOC_Get_processor_name</a>(<span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> *resultlen)
<a name="l00004"></a>00004 {
<a name="l00005"></a>00005 name[0] = <span class="charliteral">'P'</span>;
<a name="l00006"></a>00006 name[1] = <span class="charliteral">'P'</span>;
<a name="l00007"></a>00007 name[2] = <span class="charliteral">'U'</span>;
<a name="l00008"></a>00008 name[3] = <span class="charliteral">'\0'</span>;
<a name="l00009"></a>00009 *resultlen = 4;
<a name="l00010"></a>00010 <span class="keywordflow">return</span> 0;
<a name="l00011"></a>00011 }
<a name="l00012"></a>00012
</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): src/noarch/internal/communication/imoc_get_free_mid.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/noarch/internal/communication/imoc_get_free_mid.c</h1><a href="../../dd/d9a/imoc__get__free__mid_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="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#else</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><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="l00007"></a>00007 <span class="preprocessor">#endif</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00009"></a><a class="code" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df">00009</a> <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="l00010"></a>00010 {
<a name="l00011"></a>00011 <span class="keywordtype">int</span> t;
<a name="l00012"></a>00012 <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#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</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); t++)
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014 <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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a>[t].<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)
<a name="l00015"></a>00015 {
<a name="l00016"></a>00016 *mid = t;
<a name="l00017"></a>00017 <span class="keywordflow">return</span> 0;
<a name="l00018"></a>00018 }
<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#g5a536510d86dbad4f4bacf1dc3f08c47" title="No further messages possible.">MOC_ERR_MESSAGE_EXHAUSTED</a>;
<a name="l00021"></a>00021 }
<a name="l00022"></a>00022
</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,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/noarch/internal/communication/imoc_test_message.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/noarch/internal/communication/imoc_test_message.c</h1><a href="../../db/d43/imoc__test__message_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="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#else</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><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="l00007"></a>00007 <span class="preprocessor">#endif</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00009"></a><a class="code" href="../../d8/d88/group__internal__p2p__main.html#g2e74930cd8e161a131b90f2f1081037a">00009</a> <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="l00010"></a>00010 {
<a name="l00011"></a>00011 *status = <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>[mid].<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;
<a name="l00012"></a>00012 <span class="keywordflow">return</span> 0;
<a name="l00013"></a>00013 }
<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,6 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="184,80,240,107">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="32,155,149,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="28,229,169,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="193,229,263,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="32,304,157,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="232,304,363,331">
@@ -0,0 +1 @@
b94f4dc9212b5004162272e5fa382b3c
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1,132 @@
<!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_issend_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_issend_spu.c</h1><a href="../../de/d76/moc__issend__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;string.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdio.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="../../d0/d1d/moc__datatype__spu_8h.html">spu/moc_datatype_spu.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00009"></a>00009 <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="l00010"></a>00010 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>&gt;</span>
<a name="l00011"></a>00011
<a name="l00012"></a><a class="code" href="../../d7/d62/group__p2p__imm.html#gc148ff9b9bee69164139425a7df53697">00012</a> <span class="keywordtype">int</span> <a class="code" href="../../d7/d62/group__p2p__imm.html#gc148ff9b9bee69164139425a7df53697" title="Performs a non-blocking synchronous mode send operation.">MOC_ISsend</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="l00013"></a>00013 <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request)
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 <span class="keywordtype">int</span> queue_index, msg_id, bytecount, err;
<a name="l00016"></a>00016 <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="l00017"></a>00017
<a name="l00018"></a>00018 uint32_t tag_id;
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00021"></a>00021 bytecount = count;
<a name="l00022"></a>00022 <span class="keywordflow">else</span>
<a name="l00023"></a>00023 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00024"></a>00024
<a name="l00025"></a>00025 request-&gt;<a class="code" href="../../db/d17/structmoc__request__struct.html#56ab14d3df6e8c232e66aec78be949f3">request_type</a> = <a class="code" href="../../d7/d41/group__internal__p2p__imm.html#g755884e41591a0d838f45b04f3a92ab9" title="MOC_Request is associated with aISsend-Communication.">MOC_REQ_TYPE_ISSEND</a>;
<a name="l00026"></a>00026 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#db3150d28936af45c475ec5c9fb65cd8">isFinished</a> = 1;
<a name="l00027"></a>00027 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#2cfe5aa07e2fc69eff15e0e65da4efea">source</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#9005ee3d6d0ee8b2f15628dcca724710" title="rank of node">rank</a>;
<a name="l00028"></a>00028 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#526dc209a5b20ff98169e0803812fbb1">tag</a> = tag;
<a name="l00029"></a>00029 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#942c10dc3d21a8830d7714a4018cd42b">message_size</a> = bytecount;
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <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="l00032"></a>00032 <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="l00033"></a>00033 <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="l00034"></a>00034 <span class="comment">// if there is no data, permit Null-Buffer-Pointer</span>
<a name="l00035"></a>00035 <span class="keywordflow">if</span> (bytecount != 0)
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 <a class="code" href="../../d3/d32/group__internal__tm.html#g52f61fd7f3253d10b740a9fc792052c6" title="Tests if invalid buffer-pointer.">IMOC_TEST_BUFFER</a>(buf)
<a name="l00038"></a>00038 <span class="keywordflow">if</span> (bytecount &gt; 16)
<a name="l00039"></a>00039 <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="l00040"></a>00040 }
<a name="l00041"></a>00041 <a class="code" href="../../d3/d32/group__internal__tm.html#g1dfddaa8f7d9aad32b00248c7dc782d2" title="Tests if invalid rank.">IMOC_TEST_RANK</a>(dest)
<a name="l00042"></a>00042 <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="l00043"></a>00043 <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="l00044"></a>00044
<a name="l00045"></a>00045 <span class="keywordflow">if</span> ((tag_id = mfc_tag_reserve()) == MFC_TAG_INVALID)
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <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="l00048"></a>00048 }
<a name="l00049"></a>00049
<a name="l00050"></a>00050 mfc_get(queue_copy, <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="l00051"></a>00051 <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 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>, tag_id, 0,
<a name="l00052"></a>00052 0);
<a name="l00053"></a>00053 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00054"></a>00054 mfc_read_tag_status_all();
<a name="l00055"></a>00055
<a name="l00056"></a>00056 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="l00057"></a>00057 <span class="keywordflow">if</span> (err)
<a name="l00058"></a>00058 <span class="keywordflow">return</span> err;
<a name="l00059"></a>00059
<a name="l00060"></a>00060 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="l00061"></a>00061 <span class="keywordflow">if</span> (err)
<a name="l00062"></a>00062 <span class="keywordflow">return</span> err;
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="comment">/* small messages are directly sent instead of their address */</span>
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (bytecount &lt;= 8)
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="comment">//printf("SPU: sending in message-envelope\n");</span>
<a name="l00068"></a>00068 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="l00069"></a>00069 <span class="comment">// synchronous send waits till the message has been received (meaning</span>
<a name="l00070"></a>00070 <span class="comment">// recv has copied the message), so we need a signal-back.</span>
<a name="l00071"></a>00071 queue_copy[queue_index].flags.bits.signal_back = 1;
<a name="l00072"></a>00072 queue_copy[queue_index].flags.bits.in_mm = 0;
<a name="l00073"></a>00073 memcpy(&amp;queue_copy[queue_index].message_address, buf, bytecount);
<a name="l00074"></a>00074 }
<a name="l00075"></a>00075 <span class="keywordflow">else</span>
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077 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="l00078"></a>00078 queue_copy[queue_index].flags.bits.signal_back = 1;
<a name="l00079"></a>00079 queue_copy[queue_index].flags.bits.in_mm = 0;
<a name="l00080"></a>00080 queue_copy[queue_index].message_address = <a class="code" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895" title="Information each node knowns about himself and the world.">node_handle</a>.ls_base
<a name="l00081"></a>00081 + (uint32_t) buf;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="comment">/* fill missing message-envelope-entries */</span>
<a name="l00085"></a>00085 queue_copy[queue_index].communicator = comm;
<a name="l00086"></a>00086 queue_copy[queue_index].datatype = datatype;
<a name="l00087"></a>00087 queue_copy[queue_index].id = msg_id;
<a name="l00088"></a>00088 queue_copy[queue_index].size = bytecount;
<a name="l00089"></a>00089 queue_copy[queue_index].tag = tag;
<a name="l00090"></a>00090 queue_copy[queue_index].flags.bits.collaborative = 0;
<a name="l00091"></a>00091 queue_copy[queue_index].flags.bits.special = 0;
<a name="l00092"></a>00092 queue_copy[queue_index].flags.bits.valid = 1;
<a name="l00093"></a>00093 queue_copy[queue_index].flags.bits.keep_valid = 1;
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="comment">/* fill message-status-entry */</span>
<a name="l00096"></a>00096 <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="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>.outstanding = 1;
<a name="l00098"></a>00098
<a name="l00099"></a>00099 mfc_put(&amp;queue_copy[queue_index], <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,
<a name="l00100"></a>00100 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>), tag_id, 0, 0);
<a name="l00101"></a>00101 mfc_write_tag_mask(1 &lt;&lt; tag_id);
<a name="l00102"></a>00102 mfc_read_tag_status_all();
<a name="l00103"></a>00103 mfc_tag_release(tag_id);
<a name="l00104"></a>00104
<a name="l00105"></a>00105 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#db3150d28936af45c475ec5c9fb65cd8">isFinished</a> = 0;
<a name="l00106"></a>00106 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#47db330291fdf4864201fe106ec53db8">issend_request</a>.<a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#53cf82f3cdd5ddb731296d3c494d4958">mid</a> = msg_id;
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00109"></a>00109 }
<a name="l00110"></a>00110
</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 @@
c515550ed0d38b02c37478a2ff0c55c9
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@@ -0,0 +1,58 @@
<!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_send.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/noarch/communication/moc_send.c</h1><a href="../../db/d55/moc__send_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;string.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdio.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
<a name="l00007"></a>00007 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d1d/moc__datatype__spu_8h.html">spu/moc_datatype_spu.h</a>&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/d00/imoc__core__spu_8h.html">internal/spu/imoc_core_spu.h</a>&gt;</span>
<a name="l00010"></a>00010 <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="l00011"></a>00011 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#else</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include &lt;<a class="code" href="../../d8/de2/moc__datatype__ppu_8h.html">ppu/moc_datatype_ppu.h</a>&gt;</span>
<a name="l00014"></a>00014 <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="l00015"></a>00015 <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="l00016"></a>00016 <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="l00017"></a>00017 <span class="preprocessor">#endif</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a><a class="code" href="../../d0/d64/group__p2p__main.html#g23e0afbe55bc4c86cb738c3361623a4c">00019</a> <span class="keywordtype">int</span> <a class="code" href="../../d0/d64/group__p2p__main.html#g23e0afbe55bc4c86cb738c3361623a4c" title="Performs a blocking standard mode send operation.">MOC_Send</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="l00020"></a>00020 <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm)
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="keywordtype">int</span> bytecount;
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00025"></a>00025 bytecount = count;
<a name="l00026"></a>00026 <span class="keywordflow">else</span>
<a name="l00027"></a>00027 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="keywordflow">if</span> (bytecount &lt;= <a class="code" href="../../d0/d64/group__p2p__main.html#g1efd7c092411ed106006e6a75a1de78b" title="Indicates, at which message-size MOC_Send switches to synchronous send.">MOC_SEND_TRESHOLD</a>)
<a name="l00030"></a>00030 <span class="keywordflow">return</span> <a class="code" href="../../de/d84/group__p2p__buffered.html#g307bf844e1416c7c021e4a3468209d0b" title="Performs a blocking buffered mode send operation.">MOC_Bsend</a>(buf, count, datatype, dest, tag, comm);
<a name="l00031"></a>00031 <span class="keywordflow">else</span>
<a name="l00032"></a>00032 <span class="keywordflow">return</span> <a class="code" href="../../d5/dc2/group__p2p__synch.html#g46cb2ff2b5a0601165978598932d6120" title="Performs a blocking synchronous mode send operation.">MOC_Ssend</a>(buf, count, datatype, dest, tag, comm);
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="keywordflow">return</span> 0;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036
</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,7 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="125,80,181,107">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="191,155,308,181">
<area shape="rect" href="$d4/dce/imoc__dma__spu_8h.html" title="internal/spu/imoc_dma_spu.h" alt="" coords="332,155,524,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="37,229,179,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="207,229,276,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="37,304,163,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="237,304,368,331">
@@ -0,0 +1 @@
b3a5c48e1217ce31b88f7e3aed4d3f37
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@@ -0,0 +1,170 @@
<!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): MOC_Status_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>MOC_Status_struct Struct Reference<br>
<small>
[<a class="el" href="../../da/df0/group__p2p__status.html">Return Status</a>]</small>
</h1><!-- doxytag: class="MOC_Status_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 MOC_Status_struct:</div>
<div class="dynsection">
<p><center><img src="../../d2/da7/structMOC__Status__struct__coll__graph.png" border="0" usemap="#d2/d0e/MOC__Status__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>
Structure holding information about a received message.
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00225">225</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">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661">MOC_SOURCE</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">message-source <a href="#1a3fde58aca11d3b901c890916371661"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0">MOC_TAG</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">message-tag <a href="#ae670a7f91ed4d4326bfda4f17ee14f0"></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="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2">MOC_ERROR</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error-code <a href="#3d3497f7a93c00e6800da9500e52daf2"></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="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384">message_size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">message-size in byte (internal-variable) <a href="#872c34c85569926730eebe10e47af384"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d7a/structMOC__Status__struct.html#c84605b34d90e4fde486028fa8b00853">mid</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">message-ID (internal-variable) <a href="#c84605b34d90e4fde486028fa8b00853"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="1a3fde58aca11d3b901c890916371661"></a><!-- doxytag: member="MOC_Status_struct::MOC_SOURCE" ref="1a3fde58aca11d3b901c890916371661" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661">MOC_Status_struct::MOC_SOURCE</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
message-source
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00227">227</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../de/dbb/imoc__get__entry_8c-source.html#l00013">IMOC_get_entry()</a>, <a class="el" href="../../da/d3c/moc__iprobe_8c-source.html#l00005">MOC_Iprobe()</a>, <a class="el" href="../../d6/d74/moc__probe_8c-source.html#l00004">MOC_Probe()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</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="ae670a7f91ed4d4326bfda4f17ee14f0"></a><!-- doxytag: member="MOC_Status_struct::MOC_TAG" ref="ae670a7f91ed4d4326bfda4f17ee14f0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0">MOC_Status_struct::MOC_TAG</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
message-tag
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00228">228</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../da/d3c/moc__iprobe_8c-source.html#l00005">MOC_Iprobe()</a>, <a class="el" href="../../d6/d74/moc__probe_8c-source.html#l00004">MOC_Probe()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</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="3d3497f7a93c00e6800da9500e52daf2"></a><!-- doxytag: member="MOC_Status_struct::MOC_ERROR" ref="3d3497f7a93c00e6800da9500e52daf2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2">MOC_Status_struct::MOC_ERROR</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
error-code
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00229">229</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../da/d3c/moc__iprobe_8c-source.html#l00005">MOC_Iprobe()</a>, <a class="el" href="../../d6/d74/moc__probe_8c-source.html#l00004">MOC_Probe()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</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="872c34c85569926730eebe10e47af384"></a><!-- doxytag: member="MOC_Status_struct::message_size" ref="872c34c85569926730eebe10e47af384" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384">MOC_Status_struct::message_size</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
message-size in byte (internal-variable)
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00230">230</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d1/ddf/moc__get__count_8c-source.html#l00003">MOC_Get_count()</a>, <a class="el" href="../../da/d3c/moc__iprobe_8c-source.html#l00005">MOC_Iprobe()</a>, <a class="el" href="../../d6/d74/moc__probe_8c-source.html#l00004">MOC_Probe()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</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="c84605b34d90e4fde486028fa8b00853"></a><!-- doxytag: member="MOC_Status_struct::mid" ref="c84605b34d90e4fde486028fa8b00853" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/d7a/structMOC__Status__struct.html#c84605b34d90e4fde486028fa8b00853">MOC_Status_struct::mid</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
message-ID (internal-variable)
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00231">231</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../da/d3c/moc__iprobe_8c-source.html#l00005">MOC_Iprobe()</a>, <a class="el" href="../../d6/d74/moc__probe_8c-source.html#l00004">MOC_Probe()</a>, and <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</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:22 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 @@
695ff923aff305726526b24e44e28da1
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 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/dma/moc_dma-get_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-get_ppu.c</h1><a href="../../d7/d58/moc__dma-get__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;string.h&gt;</span>
<a name="l00002"></a>00002
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.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 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00006"></a>00006 <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="l00007"></a>00007 <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="l00008"></a>00008
<a name="l00009"></a><a class="code" href="../../d9/d16/group__dma__access.html#g3716465d42f20379bbf65002ecd9e448">00009</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g3716465d42f20379bbf65002ecd9e448" title="Wrapper-function for a blocking DMA-get operation.">MOC_Get_data</a>(<span class="keywordtype">void</span>* target, uint32_t source, <span class="keywordtype">int</span> count,
<a name="l00010"></a>00010 <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)
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012 <span class="keywordtype">int</span> bytecount;
<a name="l00013"></a>00013
<a name="l00014"></a>00014 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00015"></a>00015 bytecount = count;
<a name="l00016"></a>00016 <span class="keywordflow">else</span>
<a name="l00017"></a>00017 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="keywordflow">if</span> (target == 0 || source == 0 || bytecount == 0)
<a name="l00020"></a>00020 <span class="keywordflow">return</span> 0;
<a name="l00021"></a>00021 <span class="keywordflow">if</span> ((((uint64_t) target) % 16) != 0 || (source % 16) != 0)
<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8dd6c4666118378bdd3cb6cfeaeea5b1" title="Base-Adress of Buffer isn&amp;#39;t 16-byte aligned.">MOC_ERR_BAD_ALIGNMENT</a>;
<a name="l00023"></a>00023 <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="l00024"></a>00024 <a class="code" href="../../d3/d32/group__internal__tm.html#g1dfddaa8f7d9aad32b00248c7dc782d2" title="Tests if invalid rank.">IMOC_TEST_RANK</a>(dest)
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="keywordflow">return</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>(target, source, bytecount, dest);
<a name="l00027"></a>00027 }
<a name="l00028"></a>00028
</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,47 @@
<!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/internal/communication/imoc_get_free_mid.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/internal/communication/imoc_get_free_mid.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>
<p>
<div class="dynheader">
Include dependency graph for imoc_get_free_mid.c:</div>
<div class="dynsection">
<p><center><img src="../../d6/d2b/imoc__get__free__mid_8c__incl.png" border="0" usemap="#src/noarch/internal/communication/imoc_get_free_mid.c_map" alt=""></center>
<map name="src/noarch/internal/communication/imoc_get_free_mid.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="176,155,232,181"><area shape="rect" href="../../d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="732,229,839,256"><area shape="rect" href="../../d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="524,80,716,107"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="49,229,167,256"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="69,304,211,331"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="400,304,469,331"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="139,379,264,405"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="339,379,469,405"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="649,304,740,331"><area shape="rect" href="../../db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="401,155,508,181"><area shape="rect" href="../../db/d62/moc__dma__ppu_8h.html" title="moc_dma_ppu.h" alt="" coords="343,229,460,256"><area shape="rect" href="../../d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="235,304,376,331"></map>
</div>
<p>
<a href="../../dd/d18/imoc__get__free__mid_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="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df">IMOC_getFreeMID</a> (int *mid)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get free message-ID. <a href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:11 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>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="208,80,264,107">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="339,80,493,107">
<area shape="rect" href="$d4/dce/imoc__dma__spu_8h.html" title="internal/spu/imoc_dma_spu.h" alt="" coords="324,155,516,181">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="81,155,199,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="109,229,251,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="275,229,344,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="109,304,235,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="309,304,440,331">
@@ -0,0 +1 @@
42499955540ac6f891c496a754ec8a43
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -0,0 +1,43 @@
<!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-wait_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-wait_spu.c</h1><a href="../../db/d38/imoc__dma-wait__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;string.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;free_align.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;spu_mfcio.h&gt;</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00007"></a>00007 <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="l00008"></a>00008
<a name="l00009"></a><a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad">00009</a> <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="l00010"></a>00010 {
<a name="l00011"></a>00011 mfc_write_tag_mask(1 &lt;&lt; request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a>);
<a name="l00012"></a>00012 mfc_read_tag_status_all();
<a name="l00013"></a>00013 <span class="keywordflow">if</span> (request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a> != 0) <span class="comment">// check if buffer was used and copy back data from there to target</span>
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 memcpy(request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">target</a> + request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a>, request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a>,
<a name="l00016"></a>00016 request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a>);
<a name="l00017"></a>00017 free(request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a>);
<a name="l00018"></a>00018 }
<a name="l00019"></a>00019 mfc_tag_release(request-&gt;<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a>);
<a name="l00020"></a>00020 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00021"></a>00021 }
</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,3 @@
<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">
@@ -0,0 +1 @@
a4b9cf358029449fc4362e77e22a8dd2
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,58 @@
<!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/system/moc_add_spu_thread_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/system/moc_add_spu_thread_ppu.c</h1><a href="../../dc/dd0/moc__add__spu__thread__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;malloc_align.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;free_align.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../db/dae/ppu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../db/dae/ppu_2moc_8h.html">ppu/moc.h</a>&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00009"></a>00009 <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="l00010"></a>00010
<a name="l00011"></a><a class="code" href="../../d8/d9a/group__environment__startup.html#geea5b7c117adae78e954f0959fe0c447">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d8/d9a/group__environment__startup.html#geea5b7c117adae78e954f0959fe0c447" title="Adds a SPU-Thread.">MOC_Add_spu_thread</a>(spe_program_handle_t* phandle, <span class="keywordtype">void</span>* argp)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 <span class="keywordflow">if</span> (<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a> &gt;= <a class="code" href="../../db/dae/ppu_2moc_8h.html#a6aacc64a745d563ed72610e08ceb3ef" title="Maximum number of possible SPU-threads.">MOC_SPU_THREAD_MAX</a>)
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gb41314dc085e915eab769ff2a2958061" title="Internal Buffer Overflow.">MOC_ERR_BUFFER_OVERFLOW</a>;
<a name="l00016"></a>00016 }
<a name="l00017"></a>00017 <span class="comment">/* create the SPE context */</span>
<a name="l00018"></a>00018 <span class="keywordflow">if</span> ((<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].speid = spe_context_create(
<a name="l00019"></a>00019 SPE_MAP_PS, NULL)) == NULL)
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 <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="l00022"></a>00022 }
<a name="l00023"></a>00023 <span class="comment">/* load the SPE program into the SPE context */</span>
<a name="l00024"></a>00024 <span class="keywordflow">if</span> (spe_program_load(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].speid,
<a name="l00025"></a>00025 phandle) != 0)
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027 <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="l00028"></a>00028 }
<a name="l00029"></a>00029 <span class="comment">/* write thread data into thread-array */</span>
<a name="l00030"></a>00030 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#4d3f668b79c172907febb25dbe2813ea" title="Spe-entry-address.">spe_entry_adress</a>
<a name="l00031"></a>00031 = SPE_DEFAULT_ENTRY;
<a name="l00032"></a>00032 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a7f667cf56fc5e3cd906caa8aab765cc" title="effective address of user-defined information in main-memory">argp</a> = argp;
<a name="l00033"></a>00033 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>++;
<a name="l00034"></a>00034 <span class="keywordflow">return</span> 0;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036
</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,99 @@
<!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): moc_internal_buffer_node_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>moc_internal_buffer_node_struct Struct Reference<br>
<small>
[<a class="el" href="../../d3/dd3/group__internal__p2p__bmalloc.html">Buffer-Management</a>]</small>
</h1><!-- doxytag: class="moc_internal_buffer_node_struct" --><code>#include &lt;<a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for moc_internal_buffer_node_struct:</div>
<div class="dynsection">
<p><center><img src="../../d2/d2a/structmoc__internal__buffer__node__struct__coll__graph.png" border="0" usemap="#d7/d22/moc__internal__buffer__node__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>
Node of linked list holding information about allocated buffer-space.
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00180">180</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.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">struct <br>
<a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html">moc_internal_buffer_node_struct</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679">next_node</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to next entry. <a href="#289260f38a9ad908733278bc674b3679"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e">mid</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message-ID of message using buffer-space. <a href="#5d1d937feff5aa2432aeed723a22ed7e"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="289260f38a9ad908733278bc674b3679"></a><!-- doxytag: member="moc_internal_buffer_node_struct::next_node" ref="289260f38a9ad908733278bc674b3679" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html">moc_internal_buffer_node_struct</a>* <a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679">moc_internal_buffer_node_struct::next_node</a><code> [read]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Pointer to next entry.
<p>
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00182">182</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>, and <a class="el" href="../../d1/d67/moc__finalize__ppu_8c-source.html#l00011">MOC_Finalize()</a>.</p>
</div>
</div><p>
<a class="anchor" name="5d1d937feff5aa2432aeed723a22ed7e"></a><!-- doxytag: member="moc_internal_buffer_node_struct::mid" ref="5d1d937feff5aa2432aeed723a22ed7e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e">moc_internal_buffer_node_struct::mid</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Message-ID of message using buffer-space.
<p>
Information about the used buffer-space is stored in the appropriate message-status-entry (mid is index of entry).
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00184">184</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, and <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>.</p>
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/internal/<a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:19 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,148 @@
<!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/system/moc_init_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/system/moc_init_ppu.c</h1><a href="../../d9/d04/moc__init__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;malloc_align.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;free_align.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../db/dae/ppu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../db/dae/ppu_2moc_8h.html">ppu/moc.h</a>&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00009"></a>00009 <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="l00010"></a>00010
<a name="l00011"></a><a class="code" href="../../d9/d04/moc__init__ppu_8c.html#9f5e3249bff688ab3258c8c5bfc7d61b">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d8/d9a/group__environment__startup.html#g9a59090c9d03e89f019e8276d4013c72" title="Initialize the MPI execution environment.">MOC_Init</a>(<span class="keywordtype">int</span> *argc <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>((unused)), <span class="keywordtype">char</span> ***argv <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>((unused)) )
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 <span class="keywordtype">int</span> i;
<a name="l00014"></a>00014 <span class="keywordtype">char</span> temp[16];
<a name="l00015"></a>00015 uint32_t temp2[1];
<a name="l00016"></a>00016 <span class="comment">/* create own node-handle and data-structures */</span>
<a name="l00017"></a>00017 <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> = 0;
<a name="l00018"></a>00018 <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> = <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a> + 1;
<a name="l00019"></a>00019 <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="../../dc/df1/group__internal__spu__thread.html#g2af87be0fa5a8b93ac563c819047328a" title="init message-queue size">moc_spu_queue_size</a>;
<a name="l00020"></a>00020 <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#58ca7dd0e2874d0317038dbb0c279b82" title="base-address of own message-queues">message_queue_base</a> = _malloc_align(
<a name="l00021"></a>00021 <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 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="l00022"></a>00022 * <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>, 4);
<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#58ca7dd0e2874d0317038dbb0c279b82" title="base-address of own message-queues">message_queue_base</a> == 0)
<a name="l00024"></a>00024 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00025"></a>00025 <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> = _malloc_align(<span class="keyword">sizeof</span>(<a class="code" href="../../dd/df5/structmoc__message__status__struct.html" title="Message-status structure.">moc_message_status_t</a>)
<a name="l00026"></a>00026 * (<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 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>, 4);
<a name="l00027"></a>00027 <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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a> == 0)
<a name="l00028"></a>00028 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00029"></a>00029 <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#ee118aad604058291438923545af37db" title="base-address of own buffer">buffer_base</a> = _malloc_align(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106" title="init buffer size">moc_spu_buffer_size</a>, 4);
<a name="l00030"></a>00030 <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#ee118aad604058291438923545af37db" title="base-address of own buffer">buffer_base</a> == 0)
<a name="l00031"></a>00031 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00032"></a>00032 <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#90096c2a63d01f0251fdd6c642601f45" title="size of own buffer">buffer_size</a> = <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106" title="init buffer size">moc_spu_buffer_size</a>;
<a name="l00033"></a>00033 <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#3d13ba21e187a05cb548b6b3ae39ffe7" title="address of own signal-area">signal_area</a> = _malloc_align(16, 4);
<a name="l00034"></a>00034 <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#3d13ba21e187a05cb548b6b3ae39ffe7" title="address of own signal-area">signal_area</a> == 0)
<a name="l00035"></a>00035 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00036"></a>00036 <span class="comment">/* create prozess list*/</span>
<a name="l00037"></a>00037 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a> = _malloc_align(<span class="keyword">sizeof</span>(<a class="code" href="../../d0/db8/structmoc__process__struct.html" title="Process-information structure.">moc_process_t</a>)
<a name="l00038"></a>00038 * <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>, 7);
<a name="l00039"></a>00039 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a> == 0)
<a name="l00040"></a>00040 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00041"></a>00041 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[0].<a class="code" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">type</a> = <a class="code" href="../../dd/df8/group__internal__core.html#ge8939a6190d1b74b2526d480e434894d" title="Constant for moc_process_struct.type.">MOC_PPU_PROCESS</a>;
<a name="l00042"></a>00042 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[0].<a class="code" href="../../d0/db8/structmoc__process__struct.html#9aefc9d4ee29f7c0ca1dff18cb41713c" title="effective base-address of message-queues">inbox_queue_base</a>
<a name="l00043"></a>00043 = (uint64_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#58ca7dd0e2874d0317038dbb0c279b82" title="base-address of own message-queues">message_queue_base</a>;
<a name="l00044"></a>00044 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[0].<a class="code" href="../../d0/db8/structmoc__process__struct.html#6331f5f40bddc0b08409a3599af9b8c8" title="effective base-address of message-status-array">stat_array_base</a>
<a name="l00045"></a>00045 = (uint64_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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a>;
<a name="l00046"></a>00046 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[0].<a class="code" href="../../d0/db8/structmoc__process__struct.html#a8eea33631234dc3eccf859a3d3de40e" title="effective base-address of problem-state (Signals, mailboxes, .">ps_base</a>
<a name="l00047"></a>00047 = (uint64_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#3d13ba21e187a05cb548b6b3ae39ffe7" title="address of own signal-area">signal_area</a>;
<a name="l00048"></a>00048 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a> = 1;
<a name="l00049"></a>00049 <span class="comment">/* start SPU-Threads */</span>
<a name="l00050"></a>00050 for (i = 0; i &lt; <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>; i++)
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#603a62c8b05bb561c467e34acbcff2b5" title="Pointer to environment information.">envp</a> = NULL;
<a name="l00053"></a>00053 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#610f1390167566df9b451401c0bb8667" title="rank of SPU-thread">rank</a> = i + <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>;
<a name="l00054"></a>00054 <span class="comment">/* start pthread */</span>
<a name="l00055"></a>00055 <span class="keywordflow">if</span> (pthread_create(&amp;<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].pthread, NULL,
<a name="l00056"></a>00056 &amp;<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g669046500ec44affc79468b12ddaaf92" title="PThread-function for creating SPU-Threads.">moc_spe_pthread_func</a>, &amp;<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i]) != 0)
<a name="l00057"></a>00057 <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="l00058"></a>00058 <span class="comment">/* create buffer-space for thread */</span>
<a name="l00059"></a>00059 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a65e6d8f5252b43a69951b57305ebcbf" title="base-address of the SPU-Thread&amp;#39;s buffer">buffer_base</a> = _malloc_align(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106" title="init buffer size">moc_spu_buffer_size</a>,
<a name="l00060"></a>00060 4);
<a name="l00061"></a>00061 <span class="keywordflow">if</span> (<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].buffer_base == 0)
<a name="l00062"></a>00062 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gfd59894aba31d32eeff506d8df838089" title="Insufficient Memory.">MOC_ERR_NO_MEMORY</a>;
<a name="l00063"></a>00063 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#67de0b34d22a702f8d06c0c26e01cc46" title="size of the SPU-Thread&amp;#39;s buffer">buffer_size</a> = <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106" title="init buffer size">moc_spu_buffer_size</a>;
<a name="l00064"></a>00064 <span class="comment">/* prefill entry of prozess-list */</span>
<a name="l00065"></a>00065 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">type</a>
<a name="l00066"></a>00066 = <a class="code" href="../../dd/df8/group__internal__core.html#gde1178e17b18360542f46e09a4f3fce0" title="Constant for moc_process_struct.type.">MOC_SPU_PROCESS</a>;
<a name="l00067"></a>00067 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#a8eea33631234dc3eccf859a3d3de40e" title="effective base-address of problem-state (Signals, mailboxes, .">ps_base</a>
<a name="l00068"></a>00068 = (uint64_t) spe_ps_area_get(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid,
<a name="l00069"></a>00069 SPE_MSSYNC_AREA);
<a name="l00070"></a>00070 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#a8eea33631234dc3eccf859a3d3de40e" title="effective base-address of problem-state (Signals, mailboxes, .">ps_base</a> == 0)
<a name="l00071"></a>00071 <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="l00072"></a>00072 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a1af310737612cbf58480cbb172e33c4" title="Effective Basis-Address of SPU&amp;#39;s local-storage.">ls_base</a> = (uint64_t) spe_ls_area_get(
<a name="l00073"></a>00073 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid);
<a name="l00074"></a>00074 <span class="keywordflow">if</span> (<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].ls_base == 0)
<a name="l00075"></a>00075 <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="l00076"></a>00076 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#9aefc9d4ee29f7c0ca1dff18cb41713c" title="effective base-address of message-queues">inbox_queue_base</a>
<a name="l00077"></a>00077 = (uint64_t) <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].ls_base;
<a name="l00078"></a>00078 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#6331f5f40bddc0b08409a3599af9b8c8" title="effective base-address of message-status-array">stat_array_base</a>
<a name="l00079"></a>00079 = (uint64_t) <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].ls_base;
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="comment">/* send rank, overall prozess-count, queue-size, buffer_size</span>
<a name="l00082"></a>00082 <span class="comment"> * and memory-adress of buffer to SPU via mailbox */</span>
<a name="l00083"></a>00083 temp[0] = i + moc_ppu_thread_count;
<a name="l00084"></a>00084 temp[1] = <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>;
<a name="l00085"></a>00085 temp[2] = <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="l00086"></a>00086 *((uint32_t*) &amp;temp[4]) = <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#67de0b34d22a702f8d06c0c26e01cc46" title="size of the SPU-Thread&amp;#39;s buffer">buffer_size</a>;
<a name="l00087"></a>00087 *((uint64_t*) &amp;temp[8]) = (uint64_t) <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].buffer_base;
<a name="l00088"></a>00088 <span class="keywordflow">if</span> (spe_in_mbox_write(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid, (uint32_t*) temp,
<a name="l00089"></a>00089 4, SPE_MBOX_ALL_BLOCKING) != 4)
<a name="l00090"></a>00090 <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="l00091"></a>00091 <span class="comment">/* send SPU-thread's local-store base-address to SPU */</span>
<a name="l00092"></a>00092 *((uint64_t*) temp) = (uint64_t) spe_ls_area_get(
<a name="l00093"></a>00093 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid);
<a name="l00094"></a>00094 <span class="keywordflow">if</span> (spe_in_mbox_write(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid, (uint32_t*) temp,
<a name="l00095"></a>00095 2, SPE_MBOX_ALL_BLOCKING) != 2)
<a name="l00096"></a>00096 <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="l00097"></a>00097 <span class="comment">/* wait till incoming mailbox-message from SPU */</span>
<a name="l00098"></a>00098 <span class="keywordflow">while</span> (spe_out_mbox_status(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid) &lt; 1)
<a name="l00099"></a>00099 ;
<a name="l00100"></a>00100 <span class="keywordflow">if</span> (spe_out_mbox_read(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid, temp2, 1) != 1)
<a name="l00101"></a>00101 <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="l00102"></a>00102 <span class="comment">/* write base addresses of SPU's message-queues into prozess-list */</span>
<a name="l00103"></a>00103 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#9aefc9d4ee29f7c0ca1dff18cb41713c" title="effective base-address of message-queues">inbox_queue_base</a>
<a name="l00104"></a>00104 += temp2[0];
<a name="l00105"></a>00105 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#0813ce58844b7a7d6df0341e5e1c1b17" title="Address of message-queue in SPU&amp;#39;s local-storage.">queue_base_in_ls</a> = temp2[0];
<a name="l00106"></a>00106 <span class="comment">/* wait till incoming mailbox-message from SPU */</span>
<a name="l00107"></a>00107 <span class="keywordflow">while</span> (spe_out_mbox_status(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid) &lt; 1)
<a name="l00108"></a>00108 ;
<a name="l00109"></a>00109 <span class="keywordflow">if</span> (spe_out_mbox_read(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid, temp2, 1) != 1)
<a name="l00110"></a>00110 <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="l00111"></a>00111 <span class="comment">/* write base addresses of SPU's status-array into prozess-list */</span>
<a name="l00112"></a>00112 <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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>[i + moc_ppu_thread_count].<a class="code" href="../../d0/db8/structmoc__process__struct.html#6331f5f40bddc0b08409a3599af9b8c8" title="effective base-address of message-status-array">stat_array_base</a>
<a name="l00113"></a>00113 += temp2[0];
<a name="l00114"></a>00114 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#93433bc21fa8fc6b7f65251a5cf33eb1" title="Address of status-array in SPU&amp;#39;s local-storage.">status_base_in_ls</a> = temp2[0];
<a name="l00115"></a>00115 }
<a name="l00116"></a>00116 <span class="comment">/* send memory address of prozess list to all SPU-processes */</span>
<a name="l00117"></a>00117 <span class="keywordflow">for</span> (i = 0; i &lt; moc_spu_thread_count; i++)
<a name="l00118"></a>00118 {
<a name="l00119"></a>00119 *((uint64_t*) temp2) = (uint64_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#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>;
<a name="l00120"></a>00120 if (spe_in_mbox_write(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[i].speid, temp2, 2,
<a name="l00121"></a>00121 SPE_MBOX_ALL_BLOCKING) != 2)
<a name="l00122"></a>00122 <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="l00123"></a>00123 }
<a name="l00124"></a>00124 <span class="keywordflow">return</span> 0;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126
</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,57 @@
<!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-iput_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-iput_ppu.c</h1><a href="../../d8/d06/moc__dma-iput__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;string.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdlib.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="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.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 &lt;<a class="code" href="../../de/df9/imoc__dma__ppu_8h.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</span>
<a name="l00009"></a>00009 <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="l00010"></a>00010
<a name="l00011"></a><a class="code" href="../../d9/d16/group__dma__access.html#g1fd9a141352dd4344e20f1bde778d265">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g1fd9a141352dd4344e20f1bde778d265" title="Wrapper-function for a non-blocking DMA-put operation.">MOC_IPut_data</a>(<span class="keywordtype">void</span>* source, uint32_t target, <span class="keywordtype">int</span> count,
<a name="l00012"></a>00012 <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> src, <a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request)
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014 <span class="keywordtype">int</span> bytecount;
<a name="l00015"></a>00015
<a name="l00016"></a>00016 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00017"></a>00017 bytecount = count;
<a name="l00018"></a>00018 <span class="keywordflow">else</span>
<a name="l00019"></a>00019 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="keywordflow">if</span> (target == 0 || source == 0 || bytecount == 0)
<a name="l00022"></a>00022 <span class="keywordflow">return</span> 0;
<a name="l00023"></a>00023 <span class="keywordflow">if</span> ((target % 16) != 0 || (((uint64_t) source) % 16) != 0)
<a name="l00024"></a>00024 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8dd6c4666118378bdd3cb6cfeaeea5b1" title="Base-Adress of Buffer isn&amp;#39;t 16-byte aligned.">MOC_ERR_BAD_ALIGNMENT</a>;
<a name="l00025"></a>00025 <span class="keywordflow">if</span> ((bytecount % 16) != 0)
<a name="l00026"></a>00026 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g9200eb7b0bf9f5605bc92943fee2cbdd" title="Bad Size (probably no multiple of 16).">MOC_ERR_BAD_SIZE</a>;
<a name="l00027"></a>00027 <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="l00028"></a>00028 <a class="code" href="../../d3/d32/group__internal__tm.html#g1dfddaa8f7d9aad32b00248c7dc782d2" title="Tests if invalid rank.">IMOC_TEST_RANK</a>(src)
<a name="l00029"></a>00029
<a name="l00030"></a>00030 request-&gt;<a class="code" href="../../db/d17/structmoc__request__struct.html#56ab14d3df6e8c232e66aec78be949f3">request_type</a> = <a class="code" href="../../d7/d41/group__internal__p2p__imm.html#gb4f3aa7dbf7ddfbc4a612fda560ec03b" title="MOC_Request is associated with a DMA-Communication.">MOC_REQ_TYPE_DMA</a>;
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="keywordflow">return</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>(source, target, bytecount, src,
<a name="l00033"></a>00033 &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="l00034"></a>00034 }
<a name="l00035"></a>00035
</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,39 @@
<area shape="rect" href="$d6/db1/moc__bcast_8c.html" title="src/noarch/communication/moc_bcast.c" alt="" coords="5,80,259,107">
<area shape="rect" href="$d3/dc2/moc__isend_8c.html" title="src/noarch/communication/moc_isend.c" alt="" coords="283,80,533,107">
<area shape="rect" href="$db/d55/moc__send_8c.html" title="src/noarch/communication/moc_send.c" alt="" coords="557,80,805,107">
<area shape="rect" href="$d8/d02/moc__test_8c.html" title="src/noarch/communication/moc_test.c" alt="" coords="829,80,1072,107">
<area shape="rect" href="$d4/dfc/moc__wait_8c.html" title="src/noarch/communication/moc_wait.c" alt="" coords="1096,80,1339,107">
<area shape="rect" href="$db/d33/imoc__get__entry_8c.html" title="src/noarch/internal/communication/imoc_get_entry.c" alt="" coords="1363,80,1685,107">
<area shape="rect" href="$df/d20/imoc__get__free__entry_8c.html" title="src/noarch/internal/communication/imoc_get_free_entry.c" alt="" coords="1709,80,2061,107">
<area shape="rect" href="$dd/d9a/imoc__get__free__mid_8c.html" title="src/noarch/internal/communication/imoc_get_free_mid.c" alt="" coords="2085,80,2429,107">
<area shape="rect" href="$db/d43/imoc__test__message_8c.html" title="src/noarch/internal/communication/imoc_test_message.c" alt="" coords="2453,80,2805,107">
<area shape="rect" href="$da/d91/imoc__wait__message_8c.html" title="src/noarch/internal/communication/imoc_wait_message.c" alt="" coords="2829,80,3181,107">
<area shape="rect" href="$d2/d7b/imoc__buffer__malloc_8c.html" title="src/noarch/internal/imoc_buffer_malloc.c" alt="" coords="3205,80,3459,107">
<area shape="rect" href="$d3/d9d/moc__comm__rank_8c.html" title="src/noarch/system/moc_comm_rank.c" alt="" coords="3483,80,3725,107">
<area shape="rect" href="$df/ddd/moc__comm__size_8c.html" title="src/noarch/system/moc_comm_size.c" alt="" coords="3749,80,3992,107">
<area shape="rect" href="$d1/d72/moc__barrier__ppu_8c.html" title="src/ppu/communication/moc_barrier_ppu.c" alt="" coords="4016,80,4283,107">
<area shape="rect" href="$d9/d14/moc__bsend__ppu_8c.html" title="src/ppu/communication/moc_bsend_ppu.c" alt="" coords="4307,80,4573,107">
<area shape="rect" href="$dc/d02/moc__issend__ppu_8c.html" title="src/ppu/communication/moc_issend_ppu.c" alt="" coords="4597,80,4867,107">
<area shape="rect" href="$dc/db7/moc__recv__ppu_8c.html" title="src/ppu/communication/moc_recv_ppu.c" alt="" coords="4891,80,5144,107">
<area shape="rect" href="$d2/d00/moc__ssend__ppu_8c.html" title="src/ppu/communication/moc_ssend_ppu.c" alt="" coords="5168,80,5435,107">
<area shape="rect" href="$d7/d58/moc__dma-get__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;get_ppu.c" alt="" coords="5459,80,5675,107">
<area shape="rect" href="$d3/dc6/moc__dma-iget__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;iget_ppu.c" alt="" coords="5699,80,5917,107">
<area shape="rect" href="$d8/d06/moc__dma-iput__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;iput_ppu.c" alt="" coords="5941,80,6160,107">
<area shape="rect" href="$d3/dfa/moc__dma-put__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;put_ppu.c" alt="" coords="6184,80,6400,107">
<area shape="rect" href="$d0/d04/moc__dma-test__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;test_ppu.c" alt="" coords="6424,80,6643,107">
<area shape="rect" href="$d6/de5/moc__dma-wait__ppu_8c.html" title="src/ppu/dma/moc_dma&#45;wait_ppu.c" alt="" coords="6667,80,6885,107">
<area shape="rect" href="$d2/d2a/moc__translate__ea__ls__ppu_8c.html" title="src/ppu/dma/moc_translate_ea_ls_ppu.c" alt="" coords="6909,80,7165,107">
<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="7189,80,7453,107">
<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="7477,80,7744,107">
<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="7768,80,8035,107">
<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="8059,80,8323,107">
<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="8347,80,8619,107">
<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="8643,80,8909,107">
<area shape="rect" href="$df/d8b/imoc__dma-wait__ppu_8c.html" title="src/ppu/internal/dma/imoc_dma&#45;wait_ppu.c" alt="" coords="8933,80,9203,107">
<area shape="rect" href="$df/d69/imoc__core__ppu_8c.html" title="src/ppu/internal/imoc_core_ppu.c" alt="" coords="9227,80,9440,107">
<area shape="rect" href="$df/dac/imoc__spe__thread__ppu_8c.html" title="src/ppu/internal/imoc_spe_thread_ppu.c" alt="" coords="9464,80,9715,107">
<area shape="rect" href="$dc/dd0/moc__add__spu__thread__ppu_8c.html" title="src/ppu/system/moc_add_spu_thread_ppu.c" alt="" coords="9739,80,10016,107">
<area shape="rect" href="$d3/d9e/moc__finalize__ppu_8c.html" title="src/ppu/system/moc_finalize_ppu.c" alt="" coords="10040,80,10267,107">
<area shape="rect" href="$d9/d04/moc__init__ppu_8c.html" title="src/ppu/system/moc_init_ppu.c" alt="" coords="10291,80,10493,107">
<area shape="rect" href="$d2/d15/moc__set__buffer__size__ppu_8c.html" title="src/ppu/system/moc_set_buffer_size_ppu.c" alt="" coords="10517,80,10789,107">
<area shape="rect" href="$df/dbf/moc__set__queue__size__ppu_8c.html" title="src/ppu/system/moc_set_queue_size_ppu.c" alt="" coords="10813,80,11091,107">
@@ -0,0 +1 @@
72cde4c29b56cd1e60a469396f10741c
Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

@@ -0,0 +1,304 @@
<!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): moc_message_status_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>moc_message_status_struct Struct Reference<br>
<small>
[<a class="el" href="../../dd/df8/group__internal__core.html">Implementation-Core</a>]</small>
</h1><!-- doxytag: class="moc_message_status_struct" --><code>#include &lt;<a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for moc_message_status_struct:</div>
<div class="dynsection">
<p><center><img src="../../d6/d2f/structmoc__message__status__struct__coll__graph.png" border="0" usemap="#d2/d60/moc__message__status__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>
Message-status structure.
<p>
Is used to store information about the message-status and the buffer used in the message-status-array.
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00125">125</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.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">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html#e8c63164c741fbe8af05ab10225f910e">buffer_offset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">allocated buffer-offset from buffer-base <a href="#e8c63164c741fbe8af05ab10225f910e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html#e2130ff455b57d82f77116fca11deb33">message_size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">size of message in byte <a href="#e2130ff455b57d82f77116fca11deb33"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html#d6888b570d01a9f1dfc41e621904d72c">error_value</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">optional error-code of message <a href="#d6888b570d01a9f1dfc41e621904d72c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap>union {</td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;struct {</td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned int&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#f46ac6349e9244afe9841afed2ec9192">valid</a>: 1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this entry valid? <a href="#28db2fe2edd5c3f8ca7b2783389be766"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned int&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#ac36e005c019f7811b14588ccc8b6ae9">outstanding</a>: 1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message is not yet received? <a href="#98b3ce6621a066f653adc5ce84526766"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned int&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#88a312a8474fb4ad31bb79be8e2704e8">buffer_used</a>: 1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is Bufferspace used? <a href="#5bc84fca1bac5f659f942d8703552d71"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned int&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#7b336d0c92a22d73f5e7585dc7b28a49">reserved</a>: 5</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reserved <a href="#e46f5d8a371fcdb399c7d4fc4755051e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap valign="top">&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512">bits</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flag-struct <a href="#d6bed2d588d95cfa44a898cf95a9c1d7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;uint8_t&nbsp;&nbsp;&nbsp;<a class="el" href="../../dd/df5/structmoc__message__status__struct.html#d6c989ccbfc4a74a8c3982a1098c3d78">value</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">union-value <a href="#bff0b28a1afee508ccf0def0d0b534db"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap valign="top">}&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">flags</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flag-union <a href="#086c0d449d25774d43512b6f7fdab8ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html#5216df4edcee08127bf6e4147b1a0aef">reserved</a> [3]</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reserved <a href="#5216df4edcee08127bf6e4147b1a0aef"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="e8c63164c741fbe8af05ab10225f910e"></a><!-- doxytag: member="moc_message_status_struct::buffer_offset" ref="e8c63164c741fbe8af05ab10225f910e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#e8c63164c741fbe8af05ab10225f910e">moc_message_status_struct::buffer_offset</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
allocated buffer-offset from buffer-base
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00127">127</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>.</p>
</div>
</div><p>
<a class="anchor" name="e2130ff455b57d82f77116fca11deb33"></a><!-- doxytag: member="moc_message_status_struct::message_size" ref="e2130ff455b57d82f77116fca11deb33" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#e2130ff455b57d82f77116fca11deb33">moc_message_status_struct::message_size</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
size of message in byte
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00128">128</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>.</p>
</div>
</div><p>
<a class="anchor" name="d6888b570d01a9f1dfc41e621904d72c"></a><!-- doxytag: member="moc_message_status_struct::error_value" ref="d6888b570d01a9f1dfc41e621904d72c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#d6888b570d01a9f1dfc41e621904d72c">moc_message_status_struct::error_value</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
optional error-code of message
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00129">129</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="f46ac6349e9244afe9841afed2ec9192"></a><!-- doxytag: member="moc_message_status_struct::valid" ref="f46ac6349e9244afe9841afed2ec9192" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#f46ac6349e9244afe9841afed2ec9192">moc_message_status_struct::valid</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Is this entry valid?
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00134">134</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="ac36e005c019f7811b14588ccc8b6ae9"></a><!-- doxytag: member="moc_message_status_struct::outstanding" ref="ac36e005c019f7811b14588ccc8b6ae9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#ac36e005c019f7811b14588ccc8b6ae9">moc_message_status_struct::outstanding</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Message is not yet received?
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00135">135</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="88a312a8474fb4ad31bb79be8e2704e8"></a><!-- doxytag: member="moc_message_status_struct::buffer_used" ref="88a312a8474fb4ad31bb79be8e2704e8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#88a312a8474fb4ad31bb79be8e2704e8">moc_message_status_struct::buffer_used</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Is Bufferspace used?
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00136">136</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="7b336d0c92a22d73f5e7585dc7b28a49"></a><!-- doxytag: member="moc_message_status_struct::reserved" ref="7b336d0c92a22d73f5e7585dc7b28a49" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#7b336d0c92a22d73f5e7585dc7b28a49">moc_message_status_struct::reserved</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
reserved
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00137">137</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="c0bdc214525521d58f12c72874de0512"></a><!-- doxytag: member="moc_message_status_struct::bits" ref="c0bdc214525521d58f12c72874de0512" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct { ... } <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512">moc_message_status_struct::bits</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
flag-struct
<p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>, <a class="el" href="../../dd/d18/imoc__get__free__mid_8c-source.html#l00009">IMOC_getFreeMID()</a>, <a class="el" href="../../dd/d1f/imoc__test__message_8c-source.html#l00009">IMOC_testForMessageCompletion()</a>, <a class="el" href="../../d2/dd3/imoc__wait__message_8c-source.html#l00009">IMOC_waitForMessageCompletion()</a>, <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">MOC_Bsend()</a>, <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">MOC_ISsend()</a>, <a class="el" href="../../d4/db6/moc__ssend__ppu_8c-source.html#l00010">MOC_Ssend()</a>, and <a class="el" href="../../d7/d24/moc__test_8c-source.html#l00013">MOC_Test()</a>.</p>
</div>
</div><p>
<a class="anchor" name="d6c989ccbfc4a74a8c3982a1098c3d78"></a><!-- doxytag: member="moc_message_status_struct::value" ref="d6c989ccbfc4a74a8c3982a1098c3d78" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#d6c989ccbfc4a74a8c3982a1098c3d78">moc_message_status_struct::value</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
union-value
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00139">139</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../de/d33/moc__wait_8c-source.html#l00011">MOC_Wait()</a>.</p>
</div>
</div><p>
<a class="anchor" name="086c0d449d25774d43512b6f7fdab8ed"></a><!-- doxytag: member="moc_message_status_struct::flags" ref="086c0d449d25774d43512b6f7fdab8ed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">union { ... } <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">moc_message_status_struct::flags</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
flag-union
<p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>, <a class="el" href="../../dd/d18/imoc__get__free__mid_8c-source.html#l00009">IMOC_getFreeMID()</a>, <a class="el" href="../../dd/d1f/imoc__test__message_8c-source.html#l00009">IMOC_testForMessageCompletion()</a>, <a class="el" href="../../d2/dd3/imoc__wait__message_8c-source.html#l00009">IMOC_waitForMessageCompletion()</a>, <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">MOC_Bsend()</a>, <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">MOC_ISsend()</a>, <a class="el" href="../../d4/db6/moc__ssend__ppu_8c-source.html#l00010">MOC_Ssend()</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="5216df4edcee08127bf6e4147b1a0aef"></a><!-- doxytag: member="moc_message_status_struct::reserved" ref="5216df4edcee08127bf6e4147b1a0aef" args="[3]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#7b336d0c92a22d73f5e7585dc7b28a49">moc_message_status_struct::reserved</a>[3] </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
reserved
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00141">141</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/internal/<a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:20 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,380 @@
<!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): Implementation-Core</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>Implementation-Core<br>
<small>
[<a class="el" href="../../dc/dc0/group__internal__main.html">Developer Documentation</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Implementation-Core:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../dd/df8/group__internal__core.png" border="0" alt="" usemap="#d6/d65/dd_2df8_2group____internal____core_map">
<map name="d6/d65/dd_2df8_2group____internal____core_map">
<area shape="rect" href="../../df/ddf/group__internal__am.html" title="Predefined Macros for calculating Addresses of Message&#45;Queue and Status&#45;Array." alt="" coords="412,5,527,32"><area shape="rect" href="../../d3/d32/group__internal__tm.html" title="Predefined Macros for testing the validity of parameters." alt="" coords="424,56,515,83"><area shape="rect" href="../../dc/dc0/group__internal__main.html" title="This section deals with the internal design and functionality." alt="" coords="5,31,173,57"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This section deals with the data-structures and the basic concepts which form the core of this implementation.
<p>
<h2><a class="anchor" name="icore_struct">
Data-Structures</a></h2>
Basically there are four data-structures. <a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_struct</a> holds meta-information about a message and <a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_struct</a> holds information about used buffer-space and provide means for a receiving proccess to send some information back to the sending process.<p>
<a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_struct</a> stores information every node needs to know about the other nodes to successfully communicate with them.<p>
The forth data-structure (actually there are two) <a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_struct</a> respectively <a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_struct</a> holds information a node know about itself and the execution environment.<h2><a class="anchor" name="core_conc">
Concepts</a></h2>
Every node has (N-1) queues for incoming messages, where N is the overall number of node. Each queue is exclusively used by a specific remote node to write meta-data about the message to be send into it (queue-entries are of type <a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_struct</a>). Because there are several independend queues and no global time is available, an exact order of all incoming messages cannot be guaranteed. Corrent ordering can only be guaranteed for messages from the same source-node. The queues are implemented in form of a big array which is divided in (N-1) equally sized pieces.<p>
Furthermore every node has an array of size (N-1)*m where m is the size of a message-queue (entries are of type <a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_struct</a>). This array is used for buffer-management and to report the status of a message back to the sender. Every message currently under progress has a message-id which is unique in respect to the sending-node. This message-id is equal to the index of the corresponding entry of the status-array.<p>
In order to communicate with other nodes every node also keeps a list of all nodes in the execution environment (entries are of type <a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_struct</a>).<p>
Pointers to the own arrays and some further information a node needs to know (e.g. own rank) is stored in the globally accessible variable <a class="el" href="../../da/d67/imoc__core__spu_8c.html#778478bb09824da1b673b244118aa82c">node_handle</a>.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/ddf/group__internal__am.html">Address-Macros</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Predefined Macros for calculating Addresses of Message-Queue and Status-Array. <br></td></tr>
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d32/group__internal__tm.html">Test-Macros</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Predefined Macros for testing the validity of parameters. <br></td></tr>
<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message-envelope structure. <a href="../../df/dd4/structmoc__message__envelope__struct.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message-status structure. <a href="../../dd/df5/structmoc__message__status__struct.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Process-information structure. <a href="../../d0/db8/structmoc__process__struct.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Node-handle structure. <a href="../../d8/d93/structmoc__node__handle__ppu__struct.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Node-handle structure. <a href="../../df/dde/structmoc__node__handle__spu__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>PPU &amp; SPU</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <br>
<a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g8c1f2e5b2dc13909f09bc8eaa5bb379a">moc_message_envelope_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message-envelope structure. <a href="#g8c1f2e5b2dc13909f09bc8eaa5bb379a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <br>
<a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g87cc837e5a9aaa444751012b8630caf7">moc_message_status_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Message-status structure. <a href="#g87cc837e5a9aaa444751012b8630caf7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#gfa56e107be54819e65330a19ef378d5a">moc_process_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Process-information structure. <a href="#gfa56e107be54819e65330a19ef378d5a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g081d07bc934f7112abc3c792b8941e0e">MOC_QUEUE_SIZE</a>&nbsp;&nbsp;&nbsp;4</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default size of the message-queues. <a href="#g081d07bc934f7112abc3c792b8941e0e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g5a64c26720f2d3569ed03dd9d0547b5a">MOC_BUFFER_SIZE</a>&nbsp;&nbsp;&nbsp;2048</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default size of the buffers used for buffered communication. <a href="#g5a64c26720f2d3569ed03dd9d0547b5a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#gda23ff5baabe186f8c37c0424598c7bc">IMOC_MESSAGE_CHANNEL_DMA</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant for moc_message_envelope_t.flags.channel. <a href="#gda23ff5baabe186f8c37c0424598c7bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g1a3153033a1eaac0ddff04deac271947">IMOC_MESSAGE_CHANNEL_ENV</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant for moc_message_envelope_t.flags.channel. <a href="#g1a3153033a1eaac0ddff04deac271947"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#ge8939a6190d1b74b2526d480e434894d">MOC_PPU_PROCESS</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant for <a class="el" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">moc_process_struct.type</a>. <a href="#ge8939a6190d1b74b2526d480e434894d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#gde1178e17b18360542f46e09a4f3fce0">MOC_SPU_PROCESS</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant for <a class="el" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">moc_process_struct.type</a>. <a href="#gde1178e17b18360542f46e09a4f3fce0"></a><br></td></tr>
<tr><td colspan="2"><br><h2>PPU only</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <br>
<a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g7435c2ee011574abc19eb4b5c5336751">moc_node_handle_ppu_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Node-handle structure. <a href="#g7435c2ee011574abc19eb4b5c5336751"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895">node_handle</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Information each node knowns about himself and the world. <a href="#geed5a271d50368d3cf9a858c4f57c895"></a><br></td></tr>
<tr><td colspan="2"><br><h2>SPU only</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <br>
<a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g0fdc204b8f7480dbe12a5879157f2cc3">moc_node_handle_spu_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Node-handle structure. <a href="#g0fdc204b8f7480dbe12a5879157f2cc3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/df8/group__internal__core.html#g778478bb09824da1b673b244118aa82c">node_handle</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Information each node knowns about himself and the world. <a href="#g778478bb09824da1b673b244118aa82c"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gda23ff5baabe186f8c37c0424598c7bc"></a><!-- doxytag: member="imoc_core.h::IMOC_MESSAGE_CHANNEL_DMA" ref="gda23ff5baabe186f8c37c0424598c7bc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IMOC_MESSAGE_CHANNEL_DMA&nbsp;&nbsp;&nbsp;0 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constant for moc_message_envelope_t.flags.channel.
<p>
Message is transported via a DMA-Call.
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00108">108</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">MOC_Bsend()</a>, <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">MOC_ISsend()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</a>, and <a class="el" href="../../d4/db6/moc__ssend__ppu_8c-source.html#l00010">MOC_Ssend()</a>.</p>
</div>
</div><p>
<a class="anchor" name="g1a3153033a1eaac0ddff04deac271947"></a><!-- doxytag: member="imoc_core.h::IMOC_MESSAGE_CHANNEL_ENV" ref="g1a3153033a1eaac0ddff04deac271947" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IMOC_MESSAGE_CHANNEL_ENV&nbsp;&nbsp;&nbsp;1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constant for moc_message_envelope_t.flags.channel.
<p>
Message is embedded in message-envelope.
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00116">116</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">MOC_Bsend()</a>, <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">MOC_ISsend()</a>, <a class="el" href="../../d8/dbc/moc__recv__ppu_8c-source.html#l00011">MOC_Recv()</a>, and <a class="el" href="../../d4/db6/moc__ssend__ppu_8c-source.html#l00010">MOC_Ssend()</a>.</p>
</div>
</div><p>
<a class="anchor" name="g5a64c26720f2d3569ed03dd9d0547b5a"></a><!-- doxytag: member="imoc_core.h::MOC_BUFFER_SIZE" ref="g5a64c26720f2d3569ed03dd9d0547b5a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_BUFFER_SIZE&nbsp;&nbsp;&nbsp;2048 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Default size of the buffers used for buffered communication.
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00068">68</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="ge8939a6190d1b74b2526d480e434894d"></a><!-- doxytag: member="imoc_core.h::MOC_PPU_PROCESS" ref="ge8939a6190d1b74b2526d480e434894d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_PPU_PROCESS&nbsp;&nbsp;&nbsp;0 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constant for <a class="el" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">moc_process_struct.type</a>.
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00148">148</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../dd/dcb/moc__init__ppu_8c-source.html#l00011">MOC_Init()</a>.</p>
</div>
</div><p>
<a class="anchor" name="g081d07bc934f7112abc3c792b8941e0e"></a><!-- doxytag: member="imoc_core.h::MOC_QUEUE_SIZE" ref="g081d07bc934f7112abc3c792b8941e0e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_QUEUE_SIZE&nbsp;&nbsp;&nbsp;4 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Default size of the message-queues.
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00063">63</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="gde1178e17b18360542f46e09a4f3fce0"></a><!-- doxytag: member="imoc_core.h::MOC_SPU_PROCESS" ref="gde1178e17b18360542f46e09a4f3fce0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_SPU_PROCESS&nbsp;&nbsp;&nbsp;1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constant for <a class="el" href="../../d0/db8/structmoc__process__struct.html#9fa234bed220e0a3daa5b110a036e72e" title="Process-type (SPU or PPU).">moc_process_struct.type</a>.
<p>
<p>Definition at line <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00153">153</a> of file <a class="el" href="../../d6/d2c/imoc__core_8h-source.html">imoc_core.h</a>.</p>
<p>Referenced by <a class="el" href="../../dd/dcb/moc__init__ppu_8c-source.html#l00011">MOC_Init()</a>.</p>
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g8c1f2e5b2dc13909f09bc8eaa5bb379a"></a><!-- doxytag: member="imoc_core.h::moc_message_envelope_t" ref="g8c1f2e5b2dc13909f09bc8eaa5bb379a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_struct</a> <a class="el" href="../../df/dd4/structmoc__message__envelope__struct.html">moc_message_envelope_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Message-envelope structure.
<p>
Is used to store meta-data about the message in the message-queues of the receiving process.
</div>
</div><p>
<a class="anchor" name="g87cc837e5a9aaa444751012b8630caf7"></a><!-- doxytag: member="imoc_core.h::moc_message_status_t" ref="g87cc837e5a9aaa444751012b8630caf7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_struct</a> <a class="el" href="../../dd/df5/structmoc__message__status__struct.html">moc_message_status_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Message-status structure.
<p>
Is used to store information about the message-status and the buffer used in the message-status-array.
</div>
</div><p>
<a class="anchor" name="g7435c2ee011574abc19eb4b5c5336751"></a><!-- doxytag: member="imoc_core_ppu.h::moc_node_handle_ppu_t" ref="g7435c2ee011574abc19eb4b5c5336751" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_struct</a> <a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Node-handle structure.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>PPU only</dd></dl>
Information each node knowns about himself and the world. typedef of <a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_struct</a>
</div>
</div><p>
<a class="anchor" name="g0fdc204b8f7480dbe12a5879157f2cc3"></a><!-- doxytag: member="imoc_core_spu.h::moc_node_handle_spu_t" ref="g0fdc204b8f7480dbe12a5879157f2cc3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_struct</a> <a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Node-handle structure.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>SPU only</dd></dl>
Information each node knowns about himself and the world. typedef of <a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_struct</a>
</div>
</div><p>
<a class="anchor" name="gfa56e107be54819e65330a19ef378d5a"></a><!-- doxytag: member="imoc_core.h::moc_process_t" ref="gfa56e107be54819e65330a19ef378d5a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_struct</a> <a class="el" href="../../d0/db8/structmoc__process__struct.html">moc_process_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Process-information structure.
<p>
Stores information about a MOC-Process. This information is used for communication between the processes.
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="g778478bb09824da1b673b244118aa82c"></a><!-- doxytag: member="imoc_core_spu.h::node_handle" ref="g778478bb09824da1b673b244118aa82c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../df/dde/structmoc__node__handle__spu__struct.html">moc_node_handle_spu_t</a> <a class="el" href="../../da/d67/imoc__core__spu_8c.html#778478bb09824da1b673b244118aa82c">node_handle</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Information each node knowns about himself and the world.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>SPU only </dd></dl>
<p>Definition at line <a class="el" href="../../db/dd9/imoc__core__spu_8h-source.html#l00047">47</a> of file <a class="el" href="../../db/dd9/imoc__core__spu_8h-source.html">imoc_core_spu.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="geed5a271d50368d3cf9a858c4f57c895"></a><!-- doxytag: member="imoc_core_ppu.h::node_handle" ref="geed5a271d50368d3cf9a858c4f57c895" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">moc_node_handle_ppu_t</a> <a class="el" href="../../da/d67/imoc__core__spu_8c.html#778478bb09824da1b673b244118aa82c">node_handle</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Information each node knowns about himself and the world.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>PPU only </dd></dl>
<p>Definition at line <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">52</a> of file <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html">imoc_core_ppu.h</a>.</p>
<p>Referenced by <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>, <a class="el" href="../../de/dbb/imoc__get__entry_8c-source.html#l00013">IMOC_get_entry()</a>, <a class="el" href="../../d1/d2a/imoc__get__free__entry_8c-source.html#l00009">IMOC_getFreeEntry()</a>, <a class="el" href="../../dd/d18/imoc__get__free__mid_8c-source.html#l00009">IMOC_getFreeMID()</a>, <a class="el" href="../../dd/d1f/imoc__test__message_8c-source.html#l00009">IMOC_testForMessageCompletion()</a>, <a class="el" href="../../d2/dd3/imoc__wait__message_8c-source.html#l00009">IMOC_waitForMessageCompletion()</a>, <a class="el" href="../../dc/d5d/moc__barrier__ppu_8c-source.html#l00011">MOC_Barrier()</a>, <a class="el" href="../../da/d19/moc__bcast_8c-source.html#l00009">MOC_Bcast()</a>, <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">MOC_Bsend()</a>, <a class="el" href="../../d9/dd3/moc__comm__rank_8c-source.html#l00008">MOC_Comm_rank()</a>, <a class="el" href="../../d8/d65/moc__comm__size_8c-source.html#l00008">MOC_Comm_size()</a>, <a class="el" href="../../d1/d67/moc__finalize__ppu_8c-source.html#l00011">MOC_Finalize()</a>, <a class="el" href="../../dd/dcb/moc__init__ppu_8c-source.html#l00011">MOC_Init()</a>, <a class="el" href="../../d5/d4e/moc__isend_8c-source.html#l00018">MOC_ISend()</a>, <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">MOC_ISsend()</a>, <a class="el" href="../../d4/db6/moc__ssend__ppu_8c-source.html#l00010">MOC_Ssend()</a>, <a class="el" href="../../d7/d24/moc__test_8c-source.html#l00013">MOC_Test()</a>, <a class="el" href="../../d7/d57/moc__translate__ls__ea__spu_8c-source.html#l00004">MOC_Translate_LS_to_EA()</a>, and <a class="el" href="../../de/d33/moc__wait_8c-source.html#l00011">MOC_Wait()</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:03 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: 5.6 KiB

@@ -0,0 +1,49 @@
<!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/dma/moc_dma-get_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/dma/moc_dma-get_spu.c</h1><a href="../../d8/d91/moc__dma-get__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
<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="../../dd/d9c/moc__dma__spu_8h.html">spu/moc_dma_spu.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../d2/d42/imoc__macros_8h.html">internal/imoc_macros.h</a>&gt;</span>
<a name="l00007"></a>00007 <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="l00008"></a>00008
<a name="l00009"></a><a class="code" href="../../d9/d16/group__dma__access.html#g7af2715950a0ab51937a63c38756b85b">00009</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g3716465d42f20379bbf65002ecd9e448" title="Wrapper-function for a blocking DMA-get operation.">MOC_Get_data</a>(<span class="keywordtype">void</span>* target, uint64_t source, <span class="keywordtype">int</span> count,
<a name="l00010"></a>00010 <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> datatype)
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012 <span class="keywordtype">int</span> bytecount;
<a name="l00013"></a>00013
<a name="l00014"></a>00014 <span class="keywordflow">if</span> (((datatype &amp; 0xF0) &gt;&gt; 4) == 0)
<a name="l00015"></a>00015 bytecount = count;
<a name="l00016"></a>00016 <span class="keywordflow">else</span>
<a name="l00017"></a>00017 bytecount = count * (((datatype &amp; 0xF0) &gt;&gt; 4) * 2);
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="keywordflow">if</span> (target == 0 || source == 0 || bytecount == 0)
<a name="l00020"></a>00020 <span class="keywordflow">return</span> 0;
<a name="l00021"></a>00021 <span class="keywordflow">if</span> ((((uint32_t) target) % 16) != 0 || (source % 16) != 0)
<a name="l00022"></a>00022 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8dd6c4666118378bdd3cb6cfeaeea5b1" title="Base-Adress of Buffer isn&amp;#39;t 16-byte aligned.">MOC_ERR_BAD_ALIGNMENT</a>;
<a name="l00023"></a>00023 <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="l00024"></a>00024
<a name="l00025"></a>00025 <span class="keywordflow">return</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>(target, source, bytecount);
<a name="l00026"></a>00026 }
<a name="l00027"></a>00027
</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,96 @@
<!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): error_strings_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>error_strings_struct Struct Reference<br>
<small>
[<a class="el" href="../../d1/d97/group__internal__error.html">Error-Handling</a>]</small>
</h1><!-- doxytag: class="error_strings_struct" --><code>#include &lt;<a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for error_strings_struct:</div>
<div class="dynsection">
<p><center><img src="../../d0/d19/structerror__strings__struct__coll__graph.png" border="0" usemap="#d0/d15/error__strings__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>
Error-Strings structure.
<p>
stores the error-string to a given error-code
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00145">145</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.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">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dfe/structerror__strings__struct.html#2378b8fb9f1758d8bb537743980b4906">error_code</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error-code <a href="#2378b8fb9f1758d8bb537743980b4906"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/dfe/structerror__strings__struct.html#5b8c2fd5c217e1514a2ca23a642325dd">text</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">error-text <a href="#5b8c2fd5c217e1514a2ca23a642325dd"></a><br></td></tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="2378b8fb9f1758d8bb537743980b4906"></a><!-- doxytag: member="error_strings_struct::error_code" ref="2378b8fb9f1758d8bb537743980b4906" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../dd/dfe/structerror__strings__struct.html#2378b8fb9f1758d8bb537743980b4906">error_strings_struct::error_code</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
error-code
<p>
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00147">147</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="5b8c2fd5c217e1514a2ca23a642325dd"></a><!-- doxytag: member="error_strings_struct::text" ref="5b8c2fd5c217e1514a2ca23a642325dd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="../../dd/dfe/structerror__strings__struct.html#5b8c2fd5c217e1514a2ca23a642325dd">error_strings_struct::text</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
error-text
<p>
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00148">148</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/internal/<a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.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>