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
+4
View File
@@ -0,0 +1,4 @@
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="51,80,120,107">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="216,80,307,107">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="moc_datatype.h" alt="" coords="28,155,143,181">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="167,155,297,181">
+1
View File
@@ -0,0 +1 @@
83adef834e4bae185e259c2bb85bf231
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,161 @@
<!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/imoc_buffer_malloc.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/imoc_buffer_malloc.c</h1><a href="../../d2/d7b/imoc__buffer__malloc_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;stdlib.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="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00006"></a>00006 <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="l00007"></a>00007 <span class="preprocessor">#else</span>
<a name="l00008"></a>00008 <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="l00009"></a>00009 <span class="preprocessor">#endif</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">/**</span>
<a name="l00012"></a>00012 <span class="comment"> * \addtogroup internal_p2p_bmalloc</span>
<a name="l00013"></a>00013 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">//@{</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">/**</span>
<a name="l00018"></a>00018 <span class="comment"> * Pointer to first entry of linked-list.</span>
<a name="l00019"></a>00019 <span class="comment"> **/</span>
<a name="l00020"></a><a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gaf9be7d34fe367a9244d50dde82777ed">00020</a> <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gaf9be7d34fe367a9244d50dde82777ed" title="Pointer to first entry of linked-list.">bmalloc_first_node</a> = 0;
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="comment">/*</span>
<a name="l00023"></a>00023 <span class="comment"> * Prints out the nodes of the linked list.</span>
<a name="l00024"></a>00024 <span class="comment"> *</span>
<a name="l00025"></a>00025 <span class="comment"> * Used for debugging</span>
<a name="l00026"></a>00026 <span class="comment"> */</span><span class="comment"></span>
<a name="l00027"></a>00027 <span class="comment">/**void bmalloc_print_nodes()</span>
<a name="l00028"></a>00028 <span class="comment"> {</span>
<a name="l00029"></a>00029 <span class="comment"> if (!bmalloc_first_node)</span>
<a name="l00030"></a>00030 <span class="comment"> printf("No nodes in list\n");</span>
<a name="l00031"></a>00031 <span class="comment"> else</span>
<a name="l00032"></a>00032 <span class="comment"> {</span>
<a name="l00033"></a>00033 <span class="comment"> int z = 0;</span>
<a name="l00034"></a>00034 <span class="comment"> moc_internal_buffer_node_t* t;</span>
<a name="l00035"></a>00035 <span class="comment"> for (t = bmalloc_first_node; t != 0; t = t-&gt;next_node)</span>
<a name="l00036"></a>00036 <span class="comment"> {</span>
<a name="l00037"></a>00037 <span class="comment"> printf( "Node %i: offset %u - size %u - valid %i - mid %u\n", z,</span>
<a name="l00038"></a>00038 <span class="comment"> node_handle.status_array_base[ t-&gt;mid ].buffer_offset,</span>
<a name="l00039"></a>00039 <span class="comment"> node_handle.status_array_base[ t-&gt;mid ].message_size,</span>
<a name="l00040"></a>00040 <span class="comment"> node_handle.status_array_base[ t-&gt;mid ].flags.bits.buffer_used,</span>
<a name="l00041"></a>00041 <span class="comment"> t-&gt;mid );</span>
<a name="l00042"></a>00042 <span class="comment"> z++;</span>
<a name="l00043"></a>00043 <span class="comment"> }</span>
<a name="l00044"></a>00044 <span class="comment"> }</span>
<a name="l00045"></a>00045 <span class="comment"> }**/</span>
<a name="l00046"></a>00046 <span class="comment"></span>
<a name="l00047"></a>00047 <span class="comment">/**</span>
<a name="l00048"></a>00048 <span class="comment"> * Returns the next node holding valid buffer-information coming after node start.</span>
<a name="l00049"></a>00049 <span class="comment"> *</span>
<a name="l00050"></a>00050 <span class="comment"> * During the search all invalid nodes the function stumbles across are freed and</span>
<a name="l00051"></a>00051 <span class="comment"> * the links are corrected.</span>
<a name="l00052"></a>00052 <span class="comment"> *</span>
<a name="l00053"></a>00053 <span class="comment"> * @param start \b in start-node of search (NULL means beginning of list)</span>
<a name="l00054"></a>00054 <span class="comment"> * @return next valid node</span>
<a name="l00055"></a>00055 <span class="comment"> **/</span>
<a name="l00056"></a><a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531">00056</a> <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* <a 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>((always_inline)) bmalloc_nextValidNode(
<a name="l00057"></a>00057 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* start)
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* currentNode = 0;
<a name="l00060"></a>00060 uint8_t unusedNodes = 0;
<a name="l00061"></a>00061 <span class="keywordflow">if</span> (start)
<a name="l00062"></a>00062 currentNode = start-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679" title="Pointer to next entry.">next_node</a>;
<a name="l00063"></a>00063 <span class="keywordflow">else</span>
<a name="l00064"></a>00064 currentNode = bmalloc_first_node;
<a name="l00065"></a>00065 <span class="comment">/* skip and free unused nodes of linked list */</span>
<a name="l00066"></a>00066 <span class="keywordflow">while</span> (currentNode
<a name="l00067"></a>00067 &amp;&amp; !<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>[currentNode-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a>].<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>.buffer_used)
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* temp = currentNode;
<a name="l00070"></a>00070 unusedNodes = 1;
<a name="l00071"></a>00071 currentNode = currentNode-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679" title="Pointer to next entry.">next_node</a>;
<a name="l00072"></a>00072 free(temp);
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074 <span class="comment">/* when nodes have been freed then correct links of linked-list */</span>
<a name="l00075"></a>00075 <span class="keywordflow">if</span> (unusedNodes)
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077 <span class="keywordflow">if</span> (start)
<a name="l00078"></a>00078 start-&gt;next_node = currentNode;
<a name="l00079"></a>00079 <span class="keywordflow">else</span>
<a name="l00080"></a>00080 bmalloc_first_node = currentNode;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 <span class="keywordflow">return</span> currentNode;
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084
<a name="l00085"></a><a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41">00085</a> uint64_t <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41" title="Allocate buffer-space.">IMOC_bmalloc</a>(uint32_t size, uint8_t mid)
<a name="l00086"></a>00086 {
<a name="l00087"></a>00087 <span class="keywordtype">int</span> temp;
<a name="l00088"></a>00088 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* lower_node = 0;
<a name="l00089"></a>00089 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* upper_node = bmalloc_nextValidNode(0);
<a name="l00090"></a>00090 uint64_t lower_bound = 0, upper_bound = 0;
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="keywordflow">if</span> (upper_node)
<a name="l00093"></a>00093 upper_bound
<a name="l00094"></a>00094 = <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>[upper_node-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a>].<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#e8c63164c741fbe8af05ab10225f910e" title="allocated buffer-offset from buffer-base">buffer_offset</a>;
<a name="l00095"></a>00095 <span class="keywordflow">else</span>
<a name="l00096"></a>00096 upper_bound = <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 name="l00097"></a>00097
<a name="l00098"></a>00098 <span class="keywordflow">while</span> (1)
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100 temp = 16 - (lower_bound % 16);
<a name="l00101"></a>00101 <span class="keywordflow">if</span> (temp &lt; 16)
<a name="l00102"></a>00102 lower_bound += temp;
<a name="l00103"></a>00103 <span class="keywordflow">if</span> (upper_bound &gt; lower_bound &amp;&amp; (upper_bound - lower_bound) &gt;= size)
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105 <a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>* temp = malloc(
<a name="l00106"></a>00106 <span class="keyword">sizeof</span>(<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html" title="Node of linked list holding information about allocated buffer-space.">moc_internal_buffer_node_t</a>));
<a name="l00107"></a>00107 <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>.buffer_used = 1;
<a name="l00108"></a>00108 <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#e8c63164c741fbe8af05ab10225f910e" title="allocated buffer-offset from buffer-base">buffer_offset</a> = lower_bound;
<a name="l00109"></a>00109 <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#e2130ff455b57d82f77116fca11deb33" title="size of message in byte">message_size</a> = size;
<a name="l00110"></a>00110 temp-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a> = mid;
<a name="l00111"></a>00111 temp-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679" title="Pointer to next entry.">next_node</a> = upper_node;
<a name="l00112"></a>00112 <span class="keywordflow">if</span> (lower_node)
<a name="l00113"></a>00113 lower_node-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#289260f38a9ad908733278bc674b3679" title="Pointer to next entry.">next_node</a> = temp;
<a name="l00114"></a>00114 <span class="keywordflow">else</span>
<a name="l00115"></a>00115 bmalloc_first_node = temp;
<a name="l00116"></a>00116 <span class="keywordflow">while</span> (upper_node)
<a name="l00117"></a>00117 upper_node = bmalloc_nextValidNode(upper_node);
<a name="l00118"></a>00118 <span class="keywordflow">return</span> (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#ee118aad604058291438923545af37db" title="base-address of own buffer">buffer_base</a> + lower_bound;
<a name="l00119"></a>00119 }
<a name="l00120"></a>00120 <span class="keywordflow">else</span>
<a name="l00121"></a>00121 {
<a name="l00122"></a>00122 <span class="keywordflow">if</span> (!upper_node)
<a name="l00123"></a>00123 <span class="keywordflow">return</span> 0;
<a name="l00124"></a>00124 lower_node = upper_node;
<a name="l00125"></a>00125 upper_node = bmalloc_nextValidNode(upper_node);
<a name="l00126"></a>00126
<a name="l00127"></a>00127 lower_bound
<a name="l00128"></a>00128 = upper_bound
<a name="l00129"></a>00129 + <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>[lower_node-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a>].<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#e2130ff455b57d82f77116fca11deb33" title="size of message in byte">message_size</a>;
<a name="l00130"></a>00130 <span class="keywordflow">if</span> (upper_node)
<a name="l00131"></a>00131 upper_bound
<a name="l00132"></a>00132 = <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>[upper_node-&gt;<a class="code" href="../../dd/dc0/structmoc__internal__buffer__node__struct.html#5d1d937feff5aa2432aeed723a22ed7e" title="Message-ID of message using buffer-space.">mid</a>].<a class="code" href="../../dd/df5/structmoc__message__status__struct.html#e8c63164c741fbe8af05ab10225f910e" title="allocated buffer-offset from buffer-base">buffer_offset</a>;
<a name="l00133"></a>00133 <span class="keywordflow">else</span>
<a name="l00134"></a>00134 upper_bound = <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 name="l00135"></a>00135 }
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 <span class="comment"></span>
<a name="l00139"></a>00139 <span class="comment">//@}</span>
</span></pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:47 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
@@ -0,0 +1,87 @@
<!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_test.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_test.c</h1><a href="../../d8/d02/moc__test_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;stdint.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="../../d9/db3/imoc_8h.html">internal/imoc.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#ifdef __SPU__</span>
<a name="l00006"></a>00006 <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="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 <span class="preprocessor">#else</span>
<a name="l00009"></a>00009 <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="l00010"></a>00010 <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="l00011"></a>00011 <span class="preprocessor">#endif</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a><a class="code" href="../../d7/d62/group__p2p__imm.html#g5ee1f1c1275717d2dc78d6058ff81e9e">00013</a> <span class="keywordtype">int</span> <a class="code" href="../../d7/d62/group__p2p__imm.html#g5ee1f1c1275717d2dc78d6058ff81e9e" title="Tests, if a non-blocking communication has been completed.">MOC_Test</a>(<a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request, <span class="keywordtype">int</span> *flag, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status)
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 uint8_t temp;
<a name="l00016"></a>00016 <span class="keywordtype">int</span> iflag, err;
<a name="l00017"></a>00017 <span class="keywordflow">if</span> (request == 0)
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g0f3215c59df79197899fc28f7e9499c8" title="Invalid request (handle).">MOC_ERR_REQUEST</a>;
<a name="l00020"></a>00020 }
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="keywordflow">switch</span> (request-&gt;<a class="code" href="../../db/d17/structmoc__request__struct.html#56ab14d3df6e8c232e66aec78be949f3">request_type</a>)
<a name="l00023"></a>00023 {
<a name="l00024"></a>00024 <span class="keywordflow">case</span> <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="l00025"></a>00025 <span class="keywordflow">if</span> (0 != (err = <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0" title="Tests if a IMOC_iget_data or IMOC_iput_data is completed.">IMOC_test_dma</a>(&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>, &amp;iflag)))
<a name="l00026"></a>00026 <span class="keywordflow">return</span> err;
<a name="l00027"></a>00027 <span class="keywordflow">if</span> (status != 0)
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384" title="message-size in byte (internal-variable)">message_size</a> = 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 class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a>;
<a name="l00030"></a>00030 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2" title="error-code">MOC_ERROR</a> = 0;
<a name="l00031"></a>00031 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0" title="message-tag">MOC_TAG</a> = 0;
<a name="l00032"></a>00032 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661" title="message-source">MOC_SOURCE</a> = 0;
<a name="l00033"></a>00033 }
<a name="l00034"></a>00034 *flag = iflag;
<a name="l00035"></a>00035 <span class="keywordflow">return</span> 0;
<a name="l00036"></a>00036 <span class="keywordflow">case</span> <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="l00037"></a>00037 <span class="keywordflow">if</span> (!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>)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <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>(
<a name="l00040"></a>00040 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>, &amp;temp);
<a name="l00041"></a>00041 <span class="keywordflow">if</span> (temp)
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 *flag = 1;
<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#abccbc7beefa7b1e2ccc84b8bd2b8805" title="base-address of own message-status-array">status_array_base</a>[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>] .<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="l00045"></a>00045 = 0;
<a name="l00046"></a>00046 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="l00047"></a>00047 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2" title="error-code">MOC_ERROR</a> = 0;
<a name="l00048"></a>00048 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661" title="message-source">MOC_SOURCE</a>
<a name="l00049"></a>00049 = 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 name="l00050"></a>00050 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0" title="message-tag">MOC_TAG</a> = 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>;
<a name="l00051"></a>00051 status-&gt;<a class="code" href="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384" title="message-size in byte (internal-variable)">message_size</a>
<a name="l00052"></a>00052 = 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>;
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054 <span class="keywordflow">else</span>
<a name="l00055"></a>00055 *flag = 0;
<a name="l00056"></a>00056 }
<a name="l00057"></a>00057 <span class="keywordflow">else</span>
<a name="l00058"></a>00058 *flag = 1;
<a name="l00059"></a>00059 <span class="keywordflow">return</span> 0;
<a name="l00060"></a>00060 <span class="keywordflow">default</span>:
<a name="l00061"></a>00061 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g0f3215c59df79197899fc28f7e9499c8" title="Invalid request (handle).">MOC_ERR_REQUEST</a>;
<a name="l00062"></a>00062 }
<a name="l00063"></a>00063
<a name="l00064"></a>00064 }
<a name="l00065"></a>00065
</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,14 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="156,155,212,181">
<area shape="rect" href="$db/d62/moc__dma__ppu_8h.html" title="ppu/moc_dma_ppu.h" alt="" coords="584,229,725,256">
<area shape="rect" href="$d8/d98/imoc__macros__ppu_8h.html" title="internal/ppu/imoc_macros_ppu.h" alt="" coords="1063,80,1271,107">
<area shape="rect" href="$d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="809,80,1001,107">
<area shape="rect" href="$de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="317,229,509,256">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="125,229,243,256">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="17,304,159,331">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="347,304,416,331">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="439,379,564,405">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="284,379,415,405">
<area shape="rect" href="$d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="689,304,831,331">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="../imoc_macros.h" alt="" coords="1124,155,1247,181">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="907,379,1011,405">
<area shape="rect" href="$db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="725,155,832,181">
@@ -0,0 +1 @@
eaad9a2b92b7433209edcbc961c26aa7
Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

@@ -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 @@
c3258153d0685d9e8937aa3d3eea71cc
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -0,0 +1,45 @@
<!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_recv_replace.c File Reference</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/noarch/communication/moc_send_recv_replace.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>
<p>
<div class="dynheader">
Include dependency graph for moc_send_recv_replace.c:</div>
<div class="dynsection">
<p><center><img src="../../da/daf/moc__send__recv__replace_8c__incl.png" border="0" usemap="#src/noarch/communication/moc_send_recv_replace.c_map" alt=""></center>
<map name="src/noarch/communication/moc_send_recv_replace.c_map">
<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"></map>
</div>
<p>
<a href="../../d9/d96/moc__send__recv__replace_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/ded/group__p2p__sendrecv.html#g1e5b32eaefd61f863f89778dcbbb70a2">MOC_Sendrecv_replace</a> (void *buf, int count, <a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a> datatype, int dest, int sendtag, int source, int recvtag, <a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm, <a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Execute a blocking send and receive. <a href="../../d2/ded/group__p2p__sendrecv.html#g1e5b32eaefd61f863f89778dcbbb70a2"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:08 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,98 @@
<!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): Non-Blocking Communication</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Non-Blocking Communication<br>
<small>
[<a class="el" href="../../d8/d88/group__internal__p2p__main.html">Point-to-Point Communication</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Non-Blocking Communication:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../d7/d41/group__internal__p2p__imm.png" border="0" alt="" usemap="#d9/d58/d7_2d41_2group____internal____p2p____imm_map">
<map name="d9/d58/d7_2d41_2group____internal____p2p____imm_map">
<area shape="rect" href="../../d8/d88/group__internal__p2p__main.html" title="Internals about Point&#45;to&#45;Point Communication." alt="" coords="5,5,200,32"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Internals about non-blocking communication.
<p>
The SPUs are very limited in usage, e.g. only one thread per SPU is supported, and so it is hard to make communication non-blocking. In fact only synchronous send and receive provide possibilities for non-blocking communication. Because we think that the advantages of a non-blocking receive aren't worth the effort, only non-blocking send is implemented at the moment. The picture below illustrates a non-blocking synchronous communication call.<p>
<div align="center">
<img src="../../isyncronous_communication_1.png" alt="isyncronous_communication_1.png">
</div>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Constants for MOC_Request.request_type</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d41/group__internal__p2p__imm.html#gb4f3aa7dbf7ddfbc4a612fda560ec03b">MOC_REQ_TYPE_DMA</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MOC_Request is associated with a DMA-Communication. <a href="#gb4f3aa7dbf7ddfbc4a612fda560ec03b"></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="../../d7/d41/group__internal__p2p__imm.html#g755884e41591a0d838f45b04f3a92ab9">MOC_REQ_TYPE_ISSEND</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">MOC_Request is associated with aISsend-Communication. <a href="#g755884e41591a0d838f45b04f3a92ab9"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gb4f3aa7dbf7ddfbc4a612fda560ec03b"></a><!-- doxytag: member="imoc.h::MOC_REQ_TYPE_DMA" ref="gb4f3aa7dbf7ddfbc4a612fda560ec03b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_REQ_TYPE_DMA&nbsp;&nbsp;&nbsp;0 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
MOC_Request is associated with a DMA-Communication.
<p>
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00025">25</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
<p>Referenced by <a class="el" href="../../d8/da3/moc__dma-iget__ppu_8c-source.html#l00011">MOC_IGet_data()</a>, <a class="el" href="../../dd/dd5/moc__dma-iput__ppu_8c-source.html#l00011">MOC_IPut_data()</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="g755884e41591a0d838f45b04f3a92ab9"></a><!-- doxytag: member="imoc.h::MOC_REQ_TYPE_ISSEND" ref="g755884e41591a0d838f45b04f3a92ab9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_REQ_TYPE_ISSEND&nbsp;&nbsp;&nbsp;1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
MOC_Request is associated with aISsend-Communication.
<p>
<p>Definition at line <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00030">30</a> of file <a class="el" href="../../d4/d9b/imoc_8h-source.html">imoc.h</a>.</p>
<p>Referenced by <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="../../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>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:17 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1 @@
4d8977c85f221b55db3b8f6992329755
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@@ -0,0 +1,14 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="176,155,232,181">
<area shape="rect" href="$d8/de2/moc__datatype__ppu_8h.html" title="ppu/moc_datatype_ppu.h" alt="" coords="323,304,491,331">
<area shape="rect" href="$d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="585,229,692,256">
<area shape="rect" href="$d8/d98/imoc__macros__ppu_8h.html" title="internal/ppu/imoc_macros_ppu.h" alt="" coords="985,80,1193,107">
<area shape="rect" href="$d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="732,80,924,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="64,304,205,331">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="229,304,299,331">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="315,379,440,405">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="160,379,291,405">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="616,304,707,331">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="../imoc_macros.h" alt="" coords="1040,155,1163,181">
<area shape="rect" href="$db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="553,155,660,181">
<area shape="rect" href="$db/d62/moc__dma__ppu_8h.html" title="moc_dma_ppu.h" alt="" coords="444,229,561,256">
@@ -0,0 +1 @@
c0dd22f30abc8443dfef1594c6f47d8a
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

@@ -0,0 +1,31 @@
<!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_translate_ls_ea_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_translate_ls_ea_spu.c</h1><a href="../../d6/dcd/moc__translate__ls__ea__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;<a class="code" href="../../dd/d9c/moc__dma__spu_8h.html">spu/moc_dma_spu.h</a>&gt;</span>
<a name="l00002"></a>00002 <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="l00003"></a>00003
<a name="l00004"></a><a class="code" href="../../d9/d16/group__dma__access.html#g1ee1f004fff19c3338f2de9d96471693">00004</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g1ee1f004fff19c3338f2de9d96471693" title="Translates a local-store address of the calling SPU into the corresponding effective-address...">MOC_Translate_LS_to_EA</a>(<span class="keywordtype">void</span>* ls, uint64_t* ea)
<a name="l00005"></a>00005 {
<a name="l00006"></a>00006 *ea = <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 + (uint32_t) ls;
<a name="l00007"></a>00007 <span class="keywordflow">return</span> 0;
<a name="l00008"></a>00008 }
<a name="l00009"></a>00009
</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,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 File Reference</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/ppu/dma/moc_dma-get_ppu.c File Reference</h1>
<p>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">moc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d8/df3/moc__dma__ppu_8h-source.html">ppu/moc_dma_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d0/d87/imoc__macros_8h-source.html">internal/imoc_macros.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../de/de1/imoc__dma__ppu_8h-source.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html">internal/ppu/imoc_core_ppu.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for moc_dma-get_ppu.c:</div>
<div class="dynsection">
<p><center><img src="../../d7/dce/moc__dma-get__ppu_8c__incl.png" border="0" usemap="#src/ppu/dma/moc_dma-get_ppu.c_map" alt=""></center>
<map name="src/ppu/dma/moc_dma-get_ppu.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="164,155,220,181"><area shape="rect" href="../../db/d62/moc__dma__ppu_8h.html" title="ppu/moc_dma_ppu.h" alt="" coords="592,229,733,256"><area shape="rect" href="../../d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="461,80,616,107"><area shape="rect" href="../../de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="325,229,517,256"><area shape="rect" href="../../d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="836,80,1028,107"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="133,229,251,256"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="17,304,159,331"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="337,304,407,331"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="411,379,536,405"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="256,379,387,405"><area shape="rect" href="../../d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="661,304,803,331"><area shape="rect" href="../../d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="877,379,981,405"><area shape="rect" href="../../db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="739,155,845,181"></map>
</div>
<p>
<a href="../../dd/d90/moc__dma-get__ppu_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d16/group__dma__access.html#g3716465d42f20379bbf65002ecd9e448">MOC_Get_data</a> (void *target, uint32_t source, int count, <a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a> datatype, int dest)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wrapper-function for a blocking DMA-get operation. <a href="../../d9/d16/group__dma__access.html#g3716465d42f20379bbf65002ecd9e448"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50: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,10 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="296,80,352,107">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="265,155,383,181">
<area shape="rect" href="$d9/db3/imoc_8h.html" title="internal/imoc.h" alt="" coords="457,155,564,181">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="528,80,683,107">
<area shape="rect" href="$d4/dce/imoc__dma__spu_8h.html" title="internal/spu/imoc_dma_spu.h" alt="" coords="588,155,780,181">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="151,229,292,256">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="385,229,455,256">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="163,304,288,331">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="413,304,544,331">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="imoc_core.h" alt="" coords="568,304,659,331">
@@ -0,0 +1 @@
182318f07795c8507246347622615edc
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

+426
View File
@@ -0,0 +1,426 @@
<!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): Non-Blocking Communication</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Non-Blocking Communication<br>
<small>
[<a class="el" href="../../d0/d64/group__p2p__main.html">Point-to-Point Communication</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Non-Blocking Communication:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../d7/d62/group__p2p__imm.png" border="0" alt="" usemap="#d7/df4/d7_2d62_2group____p2p____imm_map">
<map name="d7/df4/d7_2d62_2group____p2p____imm_map">
<area shape="rect" href="../../d0/d64/group__p2p__main.html" title="Sending and receiving of messages by processes is the basic MPI communication mechanism..." alt="" coords="5,5,200,32"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Non-blocking sending and receiving messages.
<p>
Because of restrictions of the Cell Broadband Engine non-blocking communication can only be provided with a lot of limitations. In fact the only operation where non-blocking communication make sense is synchronous send.<p>
<a class="el" href="../../d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af">MOC_ISend</a> uses blocking buffered send or non-blocking synchronous send according to the message size.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Every non-blocking communication operation has to be finished using <a class="el" href="../../d7/d62/group__p2p__imm.html#g5ee1f1c1275717d2dc78d6058ff81e9e">MOC_Test</a> or <a class="el" href="../../d7/d62/group__p2p__imm.html#g68043e4a0893fdc25c67f87bae1015a6">MOC_Wait</a>, otherwise resources are no freed and some data are not copied correctly. </dd></dl>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<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="../../db/d17/structmoc__request__struct.html">moc_request_struct</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Communication-Request (Handle). <a href="../../db/d17/structmoc__request__struct.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="../../db/d17/structmoc__request__struct.html">moc_request_struct</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d62/group__p2p__imm.html#g5a99fbe071639c65a7111884c29f4d31">MOC_Request</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Communication-Request (Handle). <a href="#g5a99fbe071639c65a7111884c29f4d31"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af">MOC_ISend</a> (void *buf, int count, <a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a> datatype, int dest, int tag, <a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm, <a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a non-blocking standard mode send operation. <a href="#gd88773e68570adfad9f99159c69502af"></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="../../d7/d62/group__p2p__imm.html#gc148ff9b9bee69164139425a7df53697">MOC_ISsend</a> (void *buf, int count, <a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a> datatype, int dest, int tag, <a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm, <a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a non-blocking synchronous mode send operation. <a href="#gc148ff9b9bee69164139425a7df53697"></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="../../d7/d62/group__p2p__imm.html#g5ee1f1c1275717d2dc78d6058ff81e9e">MOC_Test</a> (<a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *request, int *flag, <a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests, if a non-blocking communication has been completed. <a href="#g5ee1f1c1275717d2dc78d6058ff81e9e"></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="../../d7/d62/group__p2p__imm.html#g68043e4a0893fdc25c67f87bae1015a6">MOC_Wait</a> (<a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *request, <a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait till a non-blocking communication has been completed. <a href="#g68043e4a0893fdc25c67f87bae1015a6"></a><br></td></tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g5a99fbe071639c65a7111884c29f4d31"></a><!-- doxytag: member="moc.h::MOC_Request" ref="g5a99fbe071639c65a7111884c29f4d31" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="../../db/d17/structmoc__request__struct.html">moc_request_struct</a> <a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Communication-Request (Handle).
<p>
&lt; Communication-Request (Handle)
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gd88773e68570adfad9f99159c69502af"></a><!-- doxytag: member="moc.h::MOC_ISend" ref="gd88773e68570adfad9f99159c69502af" args="(void *buf, int count, MOC_Datatype datatype, int dest, int tag, MOC_Comm comm, MOC_Request *request)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_ISend </td>
<td>(</td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a>&nbsp;</td>
<td class="paramname"> <em>datatype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>dest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>tag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a>&nbsp;</td>
<td class="paramname"> <em>comm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *&nbsp;</td>
<td class="paramname"> <em>request</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Performs a non-blocking standard mode send operation.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This routine returns as soon as possible.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td><b>in</b> Pointer to buffer where data is stored </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td><b>in</b> Number of elements to be send (not equal to actual byte-value) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>datatype</em>&nbsp;</td><td><b>in</b> Type of elements to be send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td><b>in</b> Rank of receiving process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>tag</em>&nbsp;</td><td><b>in</b> Tag of message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>comm</em>&nbsp;</td><td><b>in</b> communicator of message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td><b>out</b> communication request (handle) </td></tr>
</table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>MOC_SUCCESS</em>&nbsp;</td><td>No error; MPI routine completed successfully. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>error-code </td></tr>
</table>
</dl>
<p>
byte-count &lt;= 4096 ==&gt; buffered send<p>
other ==&gt; true non-blocking send
<p>Definition at line <a class="el" href="../../d5/d4e/moc__isend_8c-source.html#l00018">18</a> of file <a class="el" href="../../d5/d4e/moc__isend_8c-source.html">moc_isend.c</a>.</p>
<p>References <a class="el" href="../../d7/de1/moc_8h-source.html#l00076">imoc_issend_request_struct::isFinished</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00575">moc_request_struct::issend_request</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00079">imoc_issend_request_struct::message_size</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/d9b/imoc_8h-source.html#l00030">MOC_REQ_TYPE_ISSEND</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00374">MOC_SEND_TRESHOLD</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00032">moc_node_handle_ppu_struct::rank</a>, <a class="el" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">moc_request_struct::request_data</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00571">moc_request_struct::request_type</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00077">imoc_issend_request_struct::source</a>, and <a class="el" href="../../d7/de1/moc_8h-source.html#l00078">imoc_issend_request_struct::tag</a>.</p>
<p>Referenced by <a class="el" href="../../da/d19/moc__bcast_8c-source.html#l00009">MOC_Bcast()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_cgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_cgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_cgraph_map">
<area shape="rect" href="../../de/d84/group__p2p__buffered.html#g307bf844e1416c7c021e4a3468209d0b" title="Performs a blocking buffered mode send operation." alt="" coords="148,107,244,133"><area shape="rect" href="../../d7/d62/group__p2p__imm.html#gc148ff9b9bee69164139425a7df53697" title="Performs a non&#45;blocking synchronous mode send operation." alt="" coords="147,56,245,83"><area shape="rect" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&quot;No nodes in list\\n&quot;);..." alt="" coords="313,5,409,32"><area shape="rect" href="../../d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41" title="Allocate buffer&#45;space." alt="" coords="308,208,415,235"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message&#45;queue (a local copy of the message&#45;queue has to be..." alt="" coords="293,56,429,83"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message&#45;ID." alt="" coords="297,107,425,133"><area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#gb48c58191a7cf4d3e502d1c7a6c0ab9c" title="Internal wrapper&#45;function for a blocking DMA&#45;put operation." alt="" coords="305,157,417,184"></map>
</div>
<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_icgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_icgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_gd88773e68570adfad9f99159c69502af_icgraph_map">
<area shape="rect" href="../../db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="148,5,239,32"></map>
</div>
</div>
</div><p>
<a class="anchor" name="gc148ff9b9bee69164139425a7df53697"></a><!-- doxytag: member="moc.h::MOC_ISsend" ref="gc148ff9b9bee69164139425a7df53697" args="(void *buf, int count, MOC_Datatype datatype, int dest, int tag, MOC_Comm comm, MOC_Request *request)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_ISsend </td>
<td>(</td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a>&nbsp;</td>
<td class="paramname"> <em>datatype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>dest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>tag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a>&nbsp;</td>
<td class="paramname"> <em>comm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *&nbsp;</td>
<td class="paramname"> <em>request</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Performs a non-blocking synchronous mode send operation.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This routine returns as soon as possible (After the message-envelope has been written into the receiver's message-queue).</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td><b>in</b> Pointer to buffer where data is stored </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td><b>in</b> Number of elements to be send (not equal to actual byte-value) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>datatype</em>&nbsp;</td><td><b>in</b> Type of elements to be send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td><b>in</b> Rank of receiving process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>tag</em>&nbsp;</td><td><b>in</b> Tag of message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>comm</em>&nbsp;</td><td><b>in</b> communicator of message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td><b>out</b> communication request (handle) </td></tr>
</table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>MOC_SUCCESS</em>&nbsp;</td><td>No error; MPI routine completed successfully. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>error-code </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html#l00010">10</a> of file <a class="el" href="../../df/df8/moc__issend__ppu_8c-source.html">moc_issend_ppu.c</a>.</p>
<p>References <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512">moc_message_status_struct::bits</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">moc_message_status_struct::flags</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00019">IMOC_EA_REMOTE_QUEUE</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00034">IMOC_EA_REMOTE_QUEUE_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="../../db/db7/imoc__macros__ppu_8h-source.html#l00025">IMOC_LS_REMOTE_QUEUE</a>, <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00108">IMOC_MESSAGE_CHANNEL_DMA</a>, <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00116">IMOC_MESSAGE_CHANNEL_ENV</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00135">IMOC_TEST_ALIGNMENT</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00116">IMOC_TEST_BUFFER</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00109">IMOC_TEST_BYTECOUNT</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00067">IMOC_TEST_COMM_SEND</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00122">IMOC_TEST_PROC_NULL</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00128">IMOC_TEST_PROC_SELF</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00095">IMOC_TEST_RANK</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00081">IMOC_TEST_TAG_SEND</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00076">imoc_issend_request_struct::isFinished</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00575">moc_request_struct::issend_request</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00049">MEMCPY_GET_TRESHOLD</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00079">imoc_issend_request_struct::message_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00075">imoc_issend_request_struct::mid</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00047">MOC_ERR_INTERN</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00106">moc_ppu_thread_count</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00030">MOC_REQ_TYPE_ISSEND</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00123">moc_spu_thread_list</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00030">MOC_SUCCESS</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00034">moc_node_handle_ppu_struct::queue_size</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00032">moc_node_handle_ppu_struct::rank</a>, <a class="el" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">moc_request_struct::request_data</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00571">moc_request_struct::request_type</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00077">imoc_issend_request_struct::source</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00036">moc_node_handle_ppu_struct::status_array_base</a>, and <a class="el" href="../../d7/de1/moc_8h-source.html#l00078">imoc_issend_request_struct::tag</a>.</p>
<p>Referenced by <a class="el" href="../../d5/d4e/moc__isend_8c-source.html#l00018">MOC_ISend()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_cgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_cgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_cgraph_map">
<area shape="rect" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&quot;No nodes in list\\n&quot;);..." alt="" coords="172,5,268,32"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message&#45;queue (a local copy of the message&#45;queue has to be..." alt="" coords="152,56,288,83"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message&#45;ID." alt="" coords="156,107,284,133"></map>
</div>
<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_icgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_icgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_gc148ff9b9bee69164139425a7df53697_icgraph_map">
<area shape="rect" href="../../d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af" title="Performs a non&#45;blocking standard mode send operation." alt="" coords="153,5,244,32"><area shape="rect" href="../../db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="295,5,385,32"></map>
</div>
</div>
</div><p>
<a class="anchor" name="g5ee1f1c1275717d2dc78d6058ff81e9e"></a><!-- doxytag: member="moc.h::MOC_Test" ref="g5ee1f1c1275717d2dc78d6058ff81e9e" args="(MOC_Request *request, int *flag, MOC_Status *status)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Test </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *&nbsp;</td>
<td class="paramname"> <em>request</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&nbsp;</td>
<td class="paramname"> <em>flag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *&nbsp;</td>
<td class="paramname"> <em>status</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Tests, if a non-blocking communication has been completed.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td><b>in</b> Communication-Request (Handle) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td><b>out</b> true, if communication-request has been completed </td></tr>
<tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td><b>out</b> Object holding status-information </td></tr>
</table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>MOC_SUCCESS</em>&nbsp;</td><td>No error; MPI routine completed successfully. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>error-code </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../d7/d24/moc__test_8c-source.html#l00013">13</a> of file <a class="el" href="../../d7/d24/moc__test_8c-source.html">moc_test.c</a>.</p>
<p>References <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512">moc_message_status_struct::bits</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00574">moc_request_struct::dma_data</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">moc_message_status_struct::flags</a>, <a class="el" href="../../d2/df9/imoc__dma-test__ppu_8c-source.html#l00009">IMOC_test_dma()</a>, <a class="el" href="../../dd/d1f/imoc__test__message_8c-source.html#l00009">IMOC_testForMessageCompletion()</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00076">imoc_issend_request_struct::isFinished</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00575">moc_request_struct::issend_request</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00079">imoc_issend_request_struct::message_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00230">MOC_Status_struct::message_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00075">imoc_issend_request_struct::mid</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00037">MOC_ERR_REQUEST</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00229">MOC_Status_struct::MOC_ERROR</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00025">MOC_REQ_TYPE_DMA</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00030">MOC_REQ_TYPE_ISSEND</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00227">MOC_Status_struct::MOC_SOURCE</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00228">MOC_Status_struct::MOC_TAG</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">moc_request_struct::request_data</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00571">moc_request_struct::request_type</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00063">imoc_dma_request_struct::size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00077">imoc_issend_request_struct::source</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00036">moc_node_handle_ppu_struct::status_array_base</a>, and <a class="el" href="../../d7/de1/moc_8h-source.html#l00078">imoc_issend_request_struct::tag</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_g5ee1f1c1275717d2dc78d6058ff81e9e_cgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_g5ee1f1c1275717d2dc78d6058ff81e9e_cgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_g5ee1f1c1275717d2dc78d6058ff81e9e_cgraph_map">
<area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0" title="Tests if a IMOC_iget_data or IMOC_iput_data is completed." alt="" coords="189,5,304,32"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g2e74930cd8e161a131b90f2f1081037a" title="Tests if message with message&#45;ID mid has been received." alt="" coords="137,56,356,83"><area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#gf465203c58c5a8066a7ef3ee91b15cec" title="Releases a reserved tag." alt="" coords="405,5,525,32"></map>
</div>
</div>
</div><p>
<a class="anchor" name="g68043e4a0893fdc25c67f87bae1015a6"></a><!-- doxytag: member="moc.h::MOC_Wait" ref="g68043e4a0893fdc25c67f87bae1015a6" args="(MOC_Request *request, MOC_Status *status)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Wait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../db/d17/structmoc__request__struct.html">MOC_Request</a> *&nbsp;</td>
<td class="paramname"> <em>request</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/d7a/structMOC__Status__struct.html">MOC_Status</a> *&nbsp;</td>
<td class="paramname"> <em>status</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Wait till a non-blocking communication has been completed.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>request</em>&nbsp;</td><td><b>in</b> Communication-Request (Handle) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td><b>out</b> Object holding status-information </td></tr>
</table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>MOC_SUCCESS</em>&nbsp;</td><td>No error; MPI routine completed successfully. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>error-code </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../de/d33/moc__wait_8c-source.html#l00011">11</a> of file <a class="el" href="../../de/d33/moc__wait_8c-source.html">moc_wait.c</a>.</p>
<p>References <a class="el" href="../../d7/de1/moc_8h-source.html#l00574">moc_request_struct::dma_data</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">moc_message_status_struct::flags</a>, <a class="el" href="../../d8/da5/imoc__dma-wait__ppu_8c-source.html#l00009">IMOC_wait_dma()</a>, <a class="el" href="../../d2/dd3/imoc__wait__message_8c-source.html#l00009">IMOC_waitForMessageCompletion()</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00076">imoc_issend_request_struct::isFinished</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00575">moc_request_struct::issend_request</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00079">imoc_issend_request_struct::message_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00230">MOC_Status_struct::message_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00075">imoc_issend_request_struct::mid</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00037">MOC_ERR_REQUEST</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00229">MOC_Status_struct::MOC_ERROR</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00025">MOC_REQ_TYPE_DMA</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00030">MOC_REQ_TYPE_ISSEND</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00227">MOC_Status_struct::MOC_SOURCE</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00228">MOC_Status_struct::MOC_TAG</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00032">moc_node_handle_ppu_struct::rank</a>, <a class="el" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">moc_request_struct::request_data</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00571">moc_request_struct::request_type</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00063">imoc_dma_request_struct::size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00077">imoc_issend_request_struct::source</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00036">moc_node_handle_ppu_struct::status_array_base</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00078">imoc_issend_request_struct::tag</a>, and <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00139">moc_message_status_struct::value</a>.</p>
<p>Referenced by <a class="el" href="../../da/d19/moc__bcast_8c-source.html#l00009">MOC_Bcast()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_cgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_cgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_cgraph_map">
<area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad" title="Waits till a IMOC_iget_data or IMOC_iput_data is completed." alt="" coords="192,5,307,32"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g8675f9552168f2dd8926cad5ac00be69" title="Wait till message with message&#45;ID mid has been received." alt="" coords="139,56,360,83"><area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#gf465203c58c5a8066a7ef3ee91b15cec" title="Releases a reserved tag." alt="" coords="408,5,528,32"></map>
</div>
<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_icgraph.png" border="0" usemap="#d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_icgraph_map" alt=""></center>
<map name="d7/d62/group__p2p__imm_g68043e4a0893fdc25c67f87bae1015a6_icgraph_map">
<area shape="rect" href="../../db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="140,5,231,32"></map>
</div>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:56 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1,3 @@
<area shape="rect" href="$d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0" title="Tests if a IMOC_iget_data or IMOC_iput_data is completed." alt="" coords="189,5,304,32">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g2e74930cd8e161a131b90f2f1081037a" title="Tests if message with message&#45;ID mid has been received." alt="" coords="137,56,356,83">
<area shape="rect" href="$d2/de2/group__internal__p2p__dma.html#gf465203c58c5a8066a7ef3ee91b15cec" title="Releases a reserved tag." alt="" coords="405,5,525,32">
@@ -0,0 +1 @@
2529a59ea522673ee74f3d5b2557e08d
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

@@ -0,0 +1,3 @@
<area shape="rect" href="$d2/de2/group__internal__p2p__dma.html#g57b89667357146b299f32bd114e0e5ad" title="Waits till a IMOC_iget_data or IMOC_iput_data is completed." alt="" coords="192,5,307,32">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g8675f9552168f2dd8926cad5ac00be69" title="Wait till message with message&#45;ID mid has been received." alt="" coords="139,56,360,83">
<area shape="rect" href="$d2/de2/group__internal__p2p__dma.html#gf465203c58c5a8066a7ef3ee91b15cec" title="Releases a reserved tag." alt="" coords="408,5,528,32">
@@ -0,0 +1 @@
73392a47729c8d32932628e6a495863a
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@@ -0,0 +1 @@
<area shape="rect" href="$db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="140,5,231,32">
@@ -0,0 +1 @@
63d544a2dc6a4e2bcbe0231a23658bdc
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,3 @@
<area shape="rect" href="$d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&quot;No nodes in list\\n&quot;);..." alt="" coords="172,5,268,32">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message&#45;queue (a local copy of the message&#45;queue has to be..." alt="" coords="152,56,288,83">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message&#45;ID." alt="" coords="156,107,284,133">
@@ -0,0 +1 @@
428ad66dd6228d9afa3caf1a3db2894e
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

@@ -0,0 +1,2 @@
<area shape="rect" href="$d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af" title="Performs a non&#45;blocking standard mode send operation." alt="" coords="153,5,244,32">
<area shape="rect" href="$db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="295,5,385,32">
@@ -0,0 +1 @@
6e0172d1513c06c5511e6b3a83651668
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,7 @@
<area shape="rect" href="$de/d84/group__p2p__buffered.html#g307bf844e1416c7c021e4a3468209d0b" title="Performs a blocking buffered mode send operation." alt="" coords="148,107,244,133">
<area shape="rect" href="$d7/d62/group__p2p__imm.html#gc148ff9b9bee69164139425a7df53697" title="Performs a non&#45;blocking synchronous mode send operation." alt="" coords="147,56,245,83">
<area shape="rect" href="$d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&quot;No nodes in list\\n&quot;);..." alt="" coords="313,5,409,32">
<area shape="rect" href="$d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41" title="Allocate buffer&#45;space." alt="" coords="308,208,415,235">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message&#45;queue (a local copy of the message&#45;queue has to be..." alt="" coords="293,56,429,83">
<area shape="rect" href="$d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message&#45;ID." alt="" coords="297,107,425,133">
<area shape="rect" href="$d2/de2/group__internal__p2p__dma.html#gb48c58191a7cf4d3e502d1c7a6c0ab9c" title="Internal wrapper&#45;function for a blocking DMA&#45;put operation." alt="" coords="305,157,417,184">
@@ -0,0 +1 @@
a0e3eb390839ffa7180a771bc6d6903b
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1 @@
<area shape="rect" href="$db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="148,5,239,32">
@@ -0,0 +1 @@
e9968cf1b31e35824e828f1a3f43b55a
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,56 @@
<!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-iput_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-iput_spu.c</h1><a href="../../dc/de8/moc__dma-iput__spu_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;spu_mfcio.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="../../dd/d9c/moc__dma__spu_8h.html">spu/moc_dma_spu.h</a>&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;<a class="code" href="../../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
<a name="l00011"></a><a class="code" href="../../d9/d16/group__dma__access.html#g3ee8513f7c0ebb782a3b0d17b8135693">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, uint64_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, <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 || (((uint32_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 name="l00029"></a>00029 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="l00030"></a>00030
<a name="l00031"></a>00031 <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,
<a name="l00032"></a>00032 &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="l00033"></a>00033 }
<a name="l00034"></a>00034
</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 @@
46d3ea5da3768543c182abc8c4f09ed5
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@@ -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 @@
294c35e7a76cae12499bdf0caa0acab5
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@@ -0,0 +1,240 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): include/internal/doxygen_internal_main.doxygen Source File</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/internal/doxygen_internal_main.doxygen</h1><a href="../../d2/daa/doxygen__internal__main_8doxygen.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MOC_INTERNAL_DOXYGEN_MAIN_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MOC_INTERNAL_DOXYGEN_MAIN_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">/**</span>
<a name="l00007"></a>00007 <span class="comment"> * \defgroup internal_main Developer Documentation</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This section deals with the internal design and functionality. For correct</span>
<a name="l00010"></a>00010 <span class="comment"> * understanding knowledge about the functionality of the Cell Broadband Engine</span>
<a name="l00011"></a>00011 <span class="comment"> * is needed. So you should read the official CBE documentation before you</span>
<a name="l00012"></a>00012 <span class="comment"> * continue.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * \note Because we had only access to a playstation, we cannot guarantee correct</span>
<a name="l00015"></a>00015 <span class="comment"> * execution on another CBE-machine than a playstation 3.</span>
<a name="l00016"></a>00016 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">/**</span>
<a name="l00018"></a>00018 <span class="comment"> * \defgroup internal_core Implementation-Core</span>
<a name="l00019"></a>00019 <span class="comment"> * \ingroup internal_main</span>
<a name="l00020"></a>00020 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00021"></a>00021 <span class="comment">/**</span>
<a name="l00022"></a>00022 <span class="comment"> * \defgroup internal_am Address-Macros</span>
<a name="l00023"></a>00023 <span class="comment"> * \ingroup internal_core</span>
<a name="l00024"></a>00024 <span class="comment"> *</span>
<a name="l00025"></a>00025 <span class="comment"> * Predefined Macros for calculating Addresses of Message-Queue and Status-Array.</span>
<a name="l00026"></a>00026 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00027"></a>00027 <span class="comment">/**</span>
<a name="l00028"></a>00028 <span class="comment"> * \defgroup internal_tm Test-Macros</span>
<a name="l00029"></a>00029 <span class="comment"> * \ingroup internal_core</span>
<a name="l00030"></a>00030 <span class="comment"> *</span>
<a name="l00031"></a>00031 <span class="comment"> * Predefined Macros for testing the validity of parameters.</span>
<a name="l00032"></a>00032 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00033"></a>00033 <span class="comment">/**</span>
<a name="l00034"></a>00034 <span class="comment"> * \defgroup internal_env Environmental Management</span>
<a name="l00035"></a>00035 <span class="comment"> * \ingroup internal_main</span>
<a name="l00036"></a>00036 <span class="comment"> *</span>
<a name="l00037"></a>00037 <span class="comment"> * Internals about Startup &amp; Shutdown and Error-Handling</span>
<a name="l00038"></a>00038 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00039"></a>00039 <span class="comment">/**</span>
<a name="l00040"></a>00040 <span class="comment"> * \defgroup internal_init Startup &amp; Shutdown</span>
<a name="l00041"></a>00041 <span class="comment"> * \ingroup internal_env</span>
<a name="l00042"></a>00042 <span class="comment"> *</span>
<a name="l00043"></a>00043 <span class="comment"> * Internals about the startup of the execution-environment and</span>
<a name="l00044"></a>00044 <span class="comment"> * SPU-Thread-Management.</span>
<a name="l00045"></a>00045 <span class="comment"> *</span>
<a name="l00046"></a>00046 <span class="comment"> * \section iinit_start Startup</span>
<a name="l00047"></a>00047 <span class="comment"> *</span>
<a name="l00048"></a>00048 <span class="comment"> * The PPU-Process creates for every SPU-thread an own thread using the</span>
<a name="l00049"></a>00049 <span class="comment"> * pthread-library (see \ref internal_spu_thread). The rank of each prozess,</span>
<a name="l00050"></a>00050 <span class="comment"> * the overall process count, the sizes of message-queue and buffer-space</span>
<a name="l00051"></a>00051 <span class="comment"> * and the effective base address of the buffer is send to each SPU-thread via</span>
<a name="l00052"></a>00052 <span class="comment"> * mailbox-messages. The SPU-threads then send the memory-addresses of their</span>
<a name="l00053"></a>00053 <span class="comment"> * message-queues and status-arrays back to the PPU-process which writes this</span>
<a name="l00054"></a>00054 <span class="comment"> * data into the prozess-list. After all SPU-Threads have reported back to the</span>
<a name="l00055"></a>00055 <span class="comment"> * PPU-process the effective address of the PPU's process-list ist distributed</span>
<a name="l00056"></a>00056 <span class="comment"> * among the SPU-processes which then copy the process-list via DMA in their</span>
<a name="l00057"></a>00057 <span class="comment"> * local storages.</span>
<a name="l00058"></a>00058 <span class="comment"> *</span>
<a name="l00059"></a>00059 <span class="comment"> * \section iinit_shut Shutdown</span>
<a name="l00060"></a>00060 <span class="comment"> *</span>
<a name="l00061"></a>00061 <span class="comment"> * \subsection iinit_shut_ppu PPU</span>
<a name="l00062"></a>00062 <span class="comment"> *</span>
<a name="l00063"></a>00063 <span class="comment"> * The PPU-process waits till all SPU-threads have signalled that they are also</span>
<a name="l00064"></a>00064 <span class="comment"> * executing the finalize-function. After that a signal is send back to each</span>
<a name="l00065"></a>00065 <span class="comment"> * SPU-Thread that they can now stop execution. Then local ressources are freed</span>
<a name="l00066"></a>00066 <span class="comment"> * and the finalize-function returns.</span>
<a name="l00067"></a>00067 <span class="comment"> *</span>
<a name="l00068"></a>00068 <span class="comment"> * \subsection iinit_shut_spu SPU</span>
<a name="l00069"></a>00069 <span class="comment"> *</span>
<a name="l00070"></a>00070 <span class="comment"> * A mailbox-message is send to the PPU to signal that the SPU-process is now</span>
<a name="l00071"></a>00071 <span class="comment"> * executing the finalize-function. After that the SPU-process is waiting till</span>
<a name="l00072"></a>00072 <span class="comment"> * a mailbox-message from the PPU-process is received. Then local ressources are</span>
<a name="l00073"></a>00073 <span class="comment"> * freed and the finalize-function returns.</span>
<a name="l00074"></a>00074 <span class="comment"> *</span>
<a name="l00075"></a>00075 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00076"></a>00076 <span class="comment">/**</span>
<a name="l00077"></a>00077 <span class="comment"> * \defgroup internal_spu_thread SPU-Thread Management</span>
<a name="l00078"></a>00078 <span class="comment"> * \ingroup internal_init</span>
<a name="l00079"></a>00079 <span class="comment"> *</span>
<a name="l00080"></a>00080 <span class="comment"> * This section deals about the creation and management of SPU-threads.</span>
<a name="l00081"></a>00081 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment"> /**</span>
<a name="l00083"></a>00083 <span class="comment"> * \defgroup internal_error Error-Handling</span>
<a name="l00084"></a>00084 <span class="comment"> * \ingroup internal_env</span>
<a name="l00085"></a>00085 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment"> /**</span>
<a name="l00087"></a>00087 <span class="comment"> * \defgroup internal_timer Timers and Synchronization</span>
<a name="l00088"></a>00088 <span class="comment"> * \ingroup internal_env</span>
<a name="l00089"></a>00089 <span class="comment"> *</span>
<a name="l00090"></a>00090 <span class="comment"> * Internals about Time.</span>
<a name="l00091"></a>00091 <span class="comment"> *</span>
<a name="l00092"></a>00092 <span class="comment"> * On the PPU "gettimeofday()" from time.h is used, because it is the only function</span>
<a name="l00093"></a>00093 <span class="comment"> * which seems to work ("clock()" from time.h always returns 0).</span>
<a name="l00094"></a>00094 <span class="comment"> *</span>
<a name="l00095"></a>00095 <span class="comment"> * On the SPU there are two implementations. One uses also "gettimeofday()" and the</span>
<a name="l00096"></a>00096 <span class="comment"> * other uses the spu-timer-library. The reason for this lies in the fact, that the</span>
<a name="l00097"></a>00097 <span class="comment"> * spu-timer-library was marked as prototype in Cell SDK 3.0 and the future development</span>
<a name="l00098"></a>00098 <span class="comment"> * of this library was uncertain. Cell SDK 3.1 has integrated the spu-timer-library in</span>
<a name="l00099"></a>00099 <span class="comment"> * the main-library and so the gettimeofday-implementation is now obsolete.</span>
<a name="l00100"></a>00100 <span class="comment"> *</span>
<a name="l00101"></a>00101 <span class="comment"> * \note The timebase-constant which is needed to calculate time is hardcoded, because</span>
<a name="l00102"></a>00102 <span class="comment"> * there was no according function for retrieving this value in Cell SDK 3.0 and we had</span>
<a name="l00103"></a>00103 <span class="comment"> * only access to a playstation 3. Now Cell SDK 3.1 provides a function for retrieving</span>
<a name="l00104"></a>00104 <span class="comment"> * the timebase value, but we didn't use it to provide backwards-compatibility. So if</span>
<a name="l00105"></a>00105 <span class="comment"> * you plan to use MOC on another platform than playstation 3 keep in mind to check if</span>
<a name="l00106"></a>00106 <span class="comment"> * the timebase-value is correct.</span>
<a name="l00107"></a>00107 <span class="comment"> *</span>
<a name="l00108"></a>00108 <span class="comment"> **/</span>
<a name="l00109"></a>00109 <span class="comment"></span>
<a name="l00110"></a>00110 <span class="comment"> /**</span>
<a name="l00111"></a>00111 <span class="comment"> * \defgroup internal_comm Groups, Context and Communicators</span>
<a name="l00112"></a>00112 <span class="comment"> * \ingroup internal_main</span>
<a name="l00113"></a>00113 <span class="comment"> *</span>
<a name="l00114"></a>00114 <span class="comment"> * At the moment user-defined groups and communicators are not implemented and maybe never</span>
<a name="l00115"></a>00115 <span class="comment"> * will be.</span>
<a name="l00116"></a>00116 <span class="comment"> * At the moment user-defined groups and communicators are not implemented and maybe never</span>
<a name="l00117"></a>00117 <span class="comment"> * will be. Nevertheless user-defined groups and communicators have been taken into</span>
<a name="l00118"></a>00118 <span class="comment"> * consideration while making the software-design (e.g. reserved field for communicator</span>
<a name="l00119"></a>00119 <span class="comment"> * in message-envelope). So it should be not too hard to implement groups and communicators.</span>
<a name="l00120"></a>00120 <span class="comment"> * However a lot of things concerning communicators are hardcoded (e.g. parameter checks).</span>
<a name="l00121"></a>00121 <span class="comment"> *</span>
<a name="l00122"></a>00122 <span class="comment"> * To save memory only one byte is used to encode the communicator. So if one</span>
<a name="l00123"></a>00123 <span class="comment"> * day user-defined communicators are implemented there are only 256 possible</span>
<a name="l00124"></a>00124 <span class="comment"> * communicators.</span>
<a name="l00125"></a>00125 <span class="comment"> **/</span>
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="comment"></span>
<a name="l00128"></a>00128 <span class="comment">/**</span>
<a name="l00129"></a>00129 <span class="comment"> * \defgroup internal_p2p_main Point-to-Point Communication</span>
<a name="l00130"></a>00130 <span class="comment"> * \ingroup internal_main</span>
<a name="l00131"></a>00131 <span class="comment"> *</span>
<a name="l00132"></a>00132 <span class="comment"> * Internals about Point-to-Point Communication.</span>
<a name="l00133"></a>00133 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00134"></a>00134 <span class="comment">/**</span>
<a name="l00135"></a>00135 <span class="comment"> * \defgroup internal_p2p_dma DMA-Helper Functions</span>
<a name="l00136"></a>00136 <span class="comment"> * \ingroup internal_p2p_main</span>
<a name="l00137"></a>00137 <span class="comment"> *</span>
<a name="l00138"></a>00138 <span class="comment"> * Functions wrapping DMA-Transfers.</span>
<a name="l00139"></a>00139 <span class="comment"> *</span>
<a name="l00140"></a>00140 <span class="comment"> * The Cell Broadband Engine uses Direct Memory Access (DMA) for communication. Therefore</span>
<a name="l00141"></a>00141 <span class="comment"> * data of a MOC-message is transfered using DMA operations. Because programming DMA is</span>
<a name="l00142"></a>00142 <span class="comment"> * rather complex, some functions are provided to hide this complexity. One DMA-call can</span>
<a name="l00143"></a>00143 <span class="comment"> * only tranfer a maximum of 16KByte of data and the data-size has to be a multiple of</span>
<a name="l00144"></a>00144 <span class="comment"> * 16 byte. The provided functions split the data into multiple DMA-calls if needed. If</span>
<a name="l00145"></a>00145 <span class="comment"> * the data-size requires it, an intermediate buffer is used into which a separate</span>
<a name="l00146"></a>00146 <span class="comment"> * DMA-Call transfers 16 byte containing the piece of data not fitting into the 16-byte</span>
<a name="l00147"></a>00147 <span class="comment"> * scheme. Then only the needed bytes are copied into the receive-buffer. But the latter</span>
<a name="l00148"></a>00148 <span class="comment"> * only works for a get-operation.</span>
<a name="l00149"></a>00149 <span class="comment"> *</span>
<a name="l00150"></a>00150 <span class="comment"> * The internal DMA-functions are also made publicly available via wrapping-function</span>
<a name="l00151"></a>00151 <span class="comment"> * (see chapter \ref dma_access) which provide parameter checks.</span>
<a name="l00152"></a>00152 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00153"></a>00153 <span class="comment">/**</span>
<a name="l00154"></a>00154 <span class="comment"> * \defgroup internal_p2p_blocking Blocking Communication</span>
<a name="l00155"></a>00155 <span class="comment"> * \ingroup internal_p2p_main</span>
<a name="l00156"></a>00156 <span class="comment"> *</span>
<a name="l00157"></a>00157 <span class="comment"> * Internals about blocking Point-to-Point Communication.</span>
<a name="l00158"></a>00158 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00159"></a>00159 <span class="comment">/**</span>
<a name="l00160"></a>00160 <span class="comment"> * \defgroup internal_p2p_synch Synchronous Communication</span>
<a name="l00161"></a>00161 <span class="comment"> * \ingroup internal_p2p_blocking</span>
<a name="l00162"></a>00162 <span class="comment"> *</span>
<a name="l00163"></a>00163 <span class="comment"> * Internals about blocking synchronous Communication.</span>
<a name="l00164"></a>00164 <span class="comment"> *</span>
<a name="l00165"></a>00165 <span class="comment"> * \image html synchronous_communication_1.png</span>
<a name="l00166"></a>00166 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00167"></a>00167 <span class="comment">/**</span>
<a name="l00168"></a>00168 <span class="comment"> * \defgroup internal_p2p_buffered Buffered Communication</span>
<a name="l00169"></a>00169 <span class="comment"> * \ingroup internal_p2p_blocking</span>
<a name="l00170"></a>00170 <span class="comment"> *</span>
<a name="l00171"></a>00171 <span class="comment"> * Internals about blocking buffered Communication.</span>
<a name="l00172"></a>00172 <span class="comment"> *</span>
<a name="l00173"></a>00173 <span class="comment"> * \image html buffered_communication_1.png</span>
<a name="l00174"></a>00174 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00175"></a>00175 <span class="comment">/**</span>
<a name="l00176"></a>00176 <span class="comment"> * \defgroup internal_p2p_bmalloc Buffer-Management</span>
<a name="l00177"></a>00177 <span class="comment"> * \ingroup internal_p2p_buffered</span>
<a name="l00178"></a>00178 <span class="comment"> *</span>
<a name="l00179"></a>00179 <span class="comment"> * This section shows how the buffer used for buffered communication is managed.</span>
<a name="l00180"></a>00180 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00181"></a>00181 <span class="comment">/**</span>
<a name="l00182"></a>00182 <span class="comment"> * \defgroup internal_p2p_imm Non-Blocking Communication</span>
<a name="l00183"></a>00183 <span class="comment"> * \ingroup internal_p2p_main</span>
<a name="l00184"></a>00184 <span class="comment"> *</span>
<a name="l00185"></a>00185 <span class="comment"> * Internals about non-blocking communication.</span>
<a name="l00186"></a>00186 <span class="comment"> *</span>
<a name="l00187"></a>00187 <span class="comment"> * The SPUs are very limited in usage, e.g. only one thread per SPU is supported,</span>
<a name="l00188"></a>00188 <span class="comment"> * and so it is hard to make communication non-blocking. In fact only synchronous</span>
<a name="l00189"></a>00189 <span class="comment"> * send and receive provide possibilities for non-blocking communication. Because</span>
<a name="l00190"></a>00190 <span class="comment"> * we think that the advantages of a non-blocking receive aren't worth the effort,</span>
<a name="l00191"></a>00191 <span class="comment"> * only non-blocking send is implemented at the moment. The picture below illustrates</span>
<a name="l00192"></a>00192 <span class="comment"> * a non-blocking synchronous communication call.</span>
<a name="l00193"></a>00193 <span class="comment"> *</span>
<a name="l00194"></a>00194 <span class="comment"> * \image html isyncronous_communication_1.png</span>
<a name="l00195"></a>00195 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00196"></a>00196 <span class="comment">/**</span>
<a name="l00197"></a>00197 <span class="comment"> * \defgroup internal_collective Collective Communication</span>
<a name="l00198"></a>00198 <span class="comment"> * \ingroup internal_main</span>
<a name="l00199"></a>00199 <span class="comment"> *</span>
<a name="l00200"></a>00200 <span class="comment"> * Internals about Collective Communication</span>
<a name="l00201"></a>00201 <span class="comment"> *</span>
<a name="l00202"></a>00202 <span class="comment"> * Currently there are only two operations implemented.</span>
<a name="l00203"></a>00203 <span class="comment"> *</span>
<a name="l00204"></a>00204 <span class="comment"> * \section MOC_Bcast</span>
<a name="l00205"></a>00205 <span class="comment"> *</span>
<a name="l00206"></a>00206 <span class="comment"> * The root node sends normal messages using the reserved tag MOC_BCAST_TAG, which</span>
<a name="l00207"></a>00207 <span class="comment"> * is received by all other nodes.</span>
<a name="l00208"></a>00208 <span class="comment"> *</span>
<a name="l00209"></a>00209 <span class="comment"> * \section MOC_Barrier</span>
<a name="l00210"></a>00210 <span class="comment"> *</span>
<a name="l00211"></a>00211 <span class="comment"> * All but the process with the highest rank send a special-message (special-flag set)</span>
<a name="l00212"></a>00212 <span class="comment"> * to the latter process. This process then sends another special-message back to</span>
<a name="l00213"></a>00213 <span class="comment"> * the others. After that the function returns on all calling processes.</span>
<a name="l00214"></a>00214 <span class="comment"> */</span>
<a name="l00215"></a>00215
<a name="l00216"></a>00216
<a name="l00217"></a>00217
<a name="l00218"></a>00218 <span class="preprocessor">#endif </span><span class="comment">/*MOC_DOXYGEN_MAIN_H_*/</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:47 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
@@ -0,0 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): src/spu/internal/dma/imoc_dma-iget_spu.c File Reference</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>src/spu/internal/dma/imoc_dma-iget_spu.c File Reference</h1>
<p>
<code>#include &lt;spu_mfcio.h&gt;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;<a class="el" href="../../dc/dcb/spu_2moc_8h-source.html">moc.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d1/d03/moc__dma__spu_8h-source.html">spu/moc_dma_spu.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d0/d87/imoc__macros_8h-source.html">internal/imoc_macros.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="../../d4/d95/imoc__dma__spu_8h-source.html">internal/spu/imoc_dma_spu.h</a>&gt;</code><br>
<p>
<div class="dynheader">
Include dependency graph for imoc_dma-iget_spu.c:</div>
<div class="dynsection">
<p><center><img src="../../d6/d68/imoc__dma-iget__spu_8c__incl.png" border="0" usemap="#src/spu/internal/dma/imoc_dma-iget_spu.c_map" alt=""></center>
<map name="src/spu/internal/dma/imoc_dma-iget_spu.c_map">
<area shape="rect" href="../../d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="296,80,352,107"><area shape="rect" href="../../dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="345,155,463,181"><area shape="rect" href="../../d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="477,80,632,107"><area shape="rect" href="../../d4/dce/imoc__dma__spu_8h.html" title="internal/spu/imoc_dma_spu.h" alt="" coords="487,155,679,181"><area shape="rect" href="../../d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="195,229,336,256"><area shape="rect" href="../../d1/d82/moc_8h.html" title="../moc.h" alt="" coords="365,229,435,256"><area shape="rect" href="../../d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="195,304,320,331"><area shape="rect" href="../../df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="395,304,525,331"></map>
</div>
<p>
<a href="../../d4/db3/imoc__dma-iget__spu_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de2/group__internal__p2p__dma.html#g928d605bbb172de96e44517820b59278">IMOC_iget_data</a> (void *target, uint64_t source, uint32_t size, <a class="el" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> *request)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal wrapper-function for a non-blocking DMA-get operation. <a href="../../d2/de2/group__internal__p2p__dma.html#g928d605bbb172de96e44517820b59278"></a><br></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:38 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 @@
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="71,80,175,107">
@@ -0,0 +1 @@
09c0f837d2ee653c3131eabdf702c423
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1 @@
7b1f5e750fafab9b6c19fb6121647a65
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): src/ppu/dma/moc_dma-test_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-test_ppu.c</h1><a href="../../d0/d04/moc__dma-test__ppu_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;<a class="code" href="../../de/df9/imoc__dma__ppu_8h.html">internal/ppu/imoc_dma_ppu.h</a>&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;<a class="code" href="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.h</a>&gt;</span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="comment">/*</span>
<a name="l00007"></a>00007 <span class="comment"> * wrapper function for IMOC_test_dma so that the syntax is more in line and more intutive use of MOC_Request instead of</span>
<a name="l00008"></a>00008 <span class="comment"> * of imoc_dma_request is possible</span>
<a name="l00009"></a>00009 <span class="comment"> */</span>
<a name="l00010"></a>00010
<a name="l00011"></a><a class="code" href="../../d9/d16/group__dma__access.html#g342d07658aae4252a2e2cd6a8cc185dd">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g342d07658aae4252a2e2cd6a8cc185dd" title="Tests if a MOC_IGet_data or IMOC_IPut_data is completed.">MOC_Test_data</a>(<a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a>* request, <span class="keywordtype">int</span> *flag)
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013 <span class="keywordflow">return</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#gdc3d91a083a9dc3aa539aee4d56616f0" title="Tests if a IMOC_iget_data or IMOC_iput_data is completed.">IMOC_test_dma</a>(&amp;(request-&gt;<a class="code" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">request_data</a>.<a class="code" href="../../db/d17/structmoc__request__struct.html#b2b561710b814f4804bce54568b67cfe">dma_data</a>), flag);
<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,13 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="164,155,220,181">
<area shape="rect" href="$db/d62/moc__dma__ppu_8h.html" title="ppu/moc_dma_ppu.h" alt="" coords="592,229,733,256">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="461,80,616,107">
<area shape="rect" href="$de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="325,229,517,256">
<area shape="rect" href="$d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="836,80,1028,107">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="133,229,251,256">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="17,304,159,331">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="337,304,407,331">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="411,379,536,405">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="256,379,387,405">
<area shape="rect" href="$d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="661,304,803,331">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="877,379,981,405">
<area shape="rect" href="$db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="739,155,845,181">
@@ -0,0 +1 @@
04f5c65f48788c73d64d7514d0c00aeb
Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

@@ -0,0 +1,13 @@
<area shape="rect" href="$d0/d3a/spu_2moc_8h.html" title="moc.h" alt="" coords="164,155,220,181">
<area shape="rect" href="$db/d62/moc__dma__ppu_8h.html" title="ppu/moc_dma_ppu.h" alt="" coords="592,229,733,256">
<area shape="rect" href="$d2/d42/imoc__macros_8h.html" title="internal/imoc_macros.h" alt="" coords="461,80,616,107">
<area shape="rect" href="$de/df9/imoc__dma__ppu_8h.html" title="internal/ppu/imoc_dma_ppu.h" alt="" coords="325,229,517,256">
<area shape="rect" href="$d6/d09/imoc__core__ppu_8h.html" title="internal/ppu/imoc_core_ppu.h" alt="" coords="836,80,1028,107">
<area shape="rect" href="$dd/d9c/moc__dma__spu_8h.html" title="moc_dma_spu.h" alt="" coords="133,229,251,256">
<area shape="rect" href="$d0/d1d/moc__datatype__spu_8h.html" title="moc_datatype_spu.h" alt="" coords="17,304,159,331">
<area shape="rect" href="$d1/d82/moc_8h.html" title="../moc.h" alt="" coords="337,304,407,331">
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="../moc_datatype.h" alt="" coords="411,379,536,405">
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="256,379,387,405">
<area shape="rect" href="$d8/de2/moc__datatype__ppu_8h.html" title="moc_datatype_ppu.h" alt="" coords="661,304,803,331">
<area shape="rect" href="$d7/d3d/imoc__core_8h.html" title="../imoc_core.h" alt="" coords="877,379,981,405">
<area shape="rect" href="$db/dae/ppu_2moc_8h.html" title="../../ppu/moc.h" alt="" coords="739,155,845,181">
@@ -0,0 +1 @@
75140f8ffc4121f64c6d09b2c5126cd4
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

@@ -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/spu/system/moc_get_proc_name_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/system/moc_get_proc_name_spu.c</h1><a href="../../d1/df4/moc__get__proc__name__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;<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">'S'</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>
+702
View File
@@ -0,0 +1,702 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): include/moc.h Source File</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/moc.h</h1><a href="../../d1/d82/moc_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MOC_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MOC_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include "<a class="code" href="../../d5/d94/moc__datatype_8h.html">moc_datatype.h</a>"</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include "<a class="code" href="../../df/d5c/moc__error__codes_8h.html">moc_error_codes.h</a>"</span>
<a name="l00007"></a>00007
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">/**</span>
<a name="l00011"></a>00011 <span class="comment"> * Indicates, in a receive, to accept a message with any tag value.</span>
<a name="l00012"></a>00012 <span class="comment"> **/</span>
<a name="l00013"></a><a class="code" href="../../d1/d82/moc_8h.html#a6d9dac1d01f8d03aa144056921e04dd">00013</a> <span class="preprocessor">#define MOC_ANY_TAG 1000</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">/**</span>
<a name="l00016"></a>00016 <span class="comment"> * Reserved Tag for Broadcast-Messages (MOC_Bcast).</span>
<a name="l00017"></a>00017 <span class="comment"> **/</span>
<a name="l00018"></a><a class="code" href="../../d1/d82/moc_8h.html#e6a1c4a011b34474cc1b4b3e67367f5f">00018</a> <span class="preprocessor">#define MOC_BCAST_TAG 250</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">/**</span>
<a name="l00021"></a>00021 <span class="comment"> * Specifies a rank that can be used to send or receive from no-one.</span>
<a name="l00022"></a>00022 <span class="comment"> **/</span>
<a name="l00023"></a><a class="code" href="../../d1/d82/moc_8h.html#c9d0a73c0b75a124512f3f3f6cc31787">00023</a> <span class="preprocessor">#define MOC_PROC_NULL 1000</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment">/**</span>
<a name="l00026"></a>00026 <span class="comment"> * Indicates, in a receive, to accept a message from any source.</span>
<a name="l00027"></a>00027 <span class="comment"> **/</span>
<a name="l00028"></a><a class="code" href="../../d1/d82/moc_8h.html#deff0c57411502be14ddf5fef3aa6e99">00028</a> <span class="preprocessor">#define MOC_ANY_SOURCE 1001</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00030"></a>00030 <span class="comment">/**</span>
<a name="l00031"></a>00031 <span class="comment"> * Maximum byte-count which can be transferred by one DMA-transfer.</span>
<a name="l00032"></a>00032 <span class="comment"> **/</span>
<a name="l00033"></a><a class="code" href="../../d1/d82/moc_8h.html#0a017736e25e8020d6ddc62e8fc96141">00033</a> <span class="preprocessor">#define MAX_DMA_CALL_SIZE 16384</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00035"></a>00035 <span class="comment">/**</span>
<a name="l00036"></a>00036 <span class="comment"> * Maximum byte-count of a MOC-message. It's only the theoretical size, because</span>
<a name="l00037"></a>00037 <span class="comment"> * practically the SPU's local-stores can only hold much fewer bytes.</span>
<a name="l00038"></a>00038 <span class="comment"> **/</span>
<a name="l00039"></a><a class="code" href="../../d1/d82/moc_8h.html#96f9a08f0625fd26bc341ab4f950d7c1">00039</a> <span class="preprocessor">#define MAX_MOC_MESSAGE_SIZE 16777215</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="comment"></span>
<a name="l00043"></a>00043 <span class="comment">/**</span>
<a name="l00044"></a>00044 <span class="comment"> * \internal</span>
<a name="l00045"></a>00045 <span class="comment"> * \addtogroup internal_p2p_imm</span>
<a name="l00046"></a>00046 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00047"></a>00047 <span class="comment">//@{</span>
<a name="l00048"></a>00048 <span class="comment"></span><span class="comment"></span>
<a name="l00049"></a>00049 <span class="comment">/**</span>
<a name="l00050"></a>00050 <span class="comment"> * \internal</span>
<a name="l00051"></a>00051 <span class="comment"> * @name Possible structures for MOC_Request.request_data.</span>
<a name="l00052"></a>00052 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00053"></a>00053 <span class="comment">//@{</span>
<a name="l00054"></a>00054 <span class="comment"></span><span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">/**</span>
<a name="l00056"></a>00056 <span class="comment"> * \internal</span>
<a name="l00057"></a>00057 <span class="comment"> * Struct with information about a non-blocking DMA-Communication.</span>
<a name="l00058"></a>00058 <span class="comment"> **/</span>
<a name="l00059"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">00059</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request_struct</a>
<a name="l00060"></a>00060 {
<a name="l00061"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">00061</a> <span class="keywordtype">char</span> *<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#efdb405d93fc52fbe483551e3bbaafac">buffer</a>;
<a name="l00062"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">00062</a> <span class="keywordtype">void</span> *<a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#aab928f79935740e686706a1296b01a9">target</a>;
<a name="l00063"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">00063</a> uint32_t <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#8322ab9ff0dbd0be788bf765f3e85e94">size</a>;
<a name="l00064"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">00064</a> uint32_t <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#e9940544a153813fd1284eaa8883a1f2">remainder</a>;
<a name="l00065"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#f81a1887a3f1aa7f965e1fb15e2220de">00065</a> uint32_t <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#f81a1887a3f1aa7f965e1fb15e2220de">dest</a>;
<a name="l00066"></a><a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">00066</a> uint32_t <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html#93345f8438f78d7a0309b4b0b0670476">tag_id</a>;
<a name="l00067"></a>00067 } <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a>;
<a name="l00068"></a>00068 <span class="comment"></span>
<a name="l00069"></a>00069 <span class="comment">/**</span>
<a name="l00070"></a>00070 <span class="comment"> * \internal</span>
<a name="l00071"></a>00071 <span class="comment"> * Struct with information about a non-blocking ISsend-Communication.</span>
<a name="l00072"></a>00072 <span class="comment"> **/</span>
<a name="l00073"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html">00073</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html">imoc_issend_request_struct</a>
<a name="l00074"></a>00074 {
<a name="l00075"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#53cf82f3cdd5ddb731296d3c494d4958">00075</a> uint8_t <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#53cf82f3cdd5ddb731296d3c494d4958">mid</a>;
<a name="l00076"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#db3150d28936af45c475ec5c9fb65cd8">00076</a> uint8_t <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#db3150d28936af45c475ec5c9fb65cd8">isFinished</a>;
<a name="l00077"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#2cfe5aa07e2fc69eff15e0e65da4efea">00077</a> uint8_t <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#2cfe5aa07e2fc69eff15e0e65da4efea">source</a>;
<a name="l00078"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#526dc209a5b20ff98169e0803812fbb1">00078</a> uint8_t <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#526dc209a5b20ff98169e0803812fbb1">tag</a>;
<a name="l00079"></a><a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#942c10dc3d21a8830d7714a4018cd42b">00079</a> uint32_t <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html#942c10dc3d21a8830d7714a4018cd42b">message_size</a>;
<a name="l00080"></a>00080 } <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html">imoc_issend_request</a>;
<a name="l00081"></a>00081 <span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment">//@}</span>
<a name="l00083"></a>00083 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00084"></a>00084 <span class="comment"></span>
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="comment"></span>
<a name="l00087"></a>00087 <span class="comment">/**</span>
<a name="l00088"></a>00088 <span class="comment"> * \addtogroup environment_error</span>
<a name="l00089"></a>00089 <span class="comment"> *</span>
<a name="l00090"></a>00090 <span class="comment"> * This section describes how errors are handled.</span>
<a name="l00091"></a>00091 <span class="comment"> *</span>
<a name="l00092"></a>00092 <span class="comment"> * Every function should return an integer if possible. This integer should be</span>
<a name="l00093"></a>00093 <span class="comment"> * MOC_SUCCESS if the operation teminated successfully otherwise an error-code</span>
<a name="l00094"></a>00094 <span class="comment"> * telling the reason of the error is returned.</span>
<a name="l00095"></a>00095 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00096"></a>00096 <span class="comment">//@{</span>
<a name="l00097"></a>00097 <span class="comment"></span><span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">/**</span>
<a name="l00099"></a>00099 <span class="comment"> * Maximal length of error-text.</span>
<a name="l00100"></a>00100 <span class="comment"> **/</span>
<a name="l00101"></a><a class="code" href="../../d8/da1/group__environment__error.html#g4f071cd9d3fc73bd6e4542a9abbb1610">00101</a> <span class="preprocessor">#define MOC_MAX_ERROR_STRING 255</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00103"></a>00103 <span class="comment">/**</span>
<a name="l00104"></a>00104 <span class="comment"> * Returns an error-text for a given error code.</span>
<a name="l00105"></a>00105 <span class="comment"> *</span>
<a name="l00106"></a>00106 <span class="comment"> * The error-text is already terminated by '\\0'.</span>
<a name="l00107"></a>00107 <span class="comment"> *</span>
<a name="l00108"></a>00108 <span class="comment"> * \param errorcode \b in Error code returned by an MPI routine</span>
<a name="l00109"></a>00109 <span class="comment"> * \param string \b out Text that corresponds to the errorcode</span>
<a name="l00110"></a>00110 <span class="comment"> * \param resultlen \b out Length of string</span>
<a name="l00111"></a>00111 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00112"></a>00112 <span class="comment"> * \retval MOC_ERR_ARG Invalid argument. Most likely an error-code out of range.</span>
<a name="l00113"></a>00113 <span class="comment"> **/</span>
<a name="l00114"></a>00114 <span class="keywordtype">int</span> <a class="code" href="../../d8/da1/group__environment__error.html#ge79331149c12155246d206d5bb7a7729" title="Returns an error-text for a given error code.">MOC_Error_string</a> ( <span class="keywordtype">int</span> errorcode, <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <span class="keywordtype">int</span> *resultlen );
<a name="l00115"></a>00115 <span class="comment"></span>
<a name="l00116"></a>00116 <span class="comment">/**</span>
<a name="l00117"></a>00117 <span class="comment"> * Converts an error code into an error class.</span>
<a name="l00118"></a>00118 <span class="comment"> *</span>
<a name="l00119"></a>00119 <span class="comment"> * \param errorcode \b in Error code returned by an MPI routine</span>
<a name="l00120"></a>00120 <span class="comment"> * \param errorclass \b out Error class associated with errorcode</span>
<a name="l00121"></a>00121 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00122"></a>00122 <span class="comment"> * \retval MOC_ERR_COMM Invalid argument. Most likely an error-code out of range.</span>
<a name="l00123"></a>00123 <span class="comment"> **/</span>
<a name="l00124"></a>00124 <span class="keywordtype">int</span> <a class="code" href="../../d8/da1/group__environment__error.html#g46d1823f8eb05511d5b98ecdeafa33b2" title="Converts an error code into an error class.">MOC_Error_class</a> ( <span class="keywordtype">int</span> errorcode, <span class="keywordtype">int</span> *errorclass );
<a name="l00125"></a>00125 <span class="comment"></span>
<a name="l00126"></a>00126 <span class="comment">//@}</span>
<a name="l00127"></a>00127 <span class="comment"></span>
<a name="l00128"></a>00128
<a name="l00129"></a>00129
<a name="l00130"></a>00130
<a name="l00131"></a>00131 <span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">/**</span>
<a name="l00133"></a>00133 <span class="comment"> * \addtogroup environment_information</span>
<a name="l00134"></a>00134 <span class="comment"> *</span>
<a name="l00135"></a>00135 <span class="comment"> * Functions to return some information about the execution environment and</span>
<a name="l00136"></a>00136 <span class="comment"> * the MOC-implementation.</span>
<a name="l00137"></a>00137 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00138"></a>00138 <span class="comment">//@{</span>
<a name="l00139"></a>00139 <span class="comment"></span><span class="comment"></span>
<a name="l00140"></a>00140 <span class="comment">/**</span>
<a name="l00141"></a>00141 <span class="comment"> * Major version-number of this MOC-Implementation</span>
<a name="l00142"></a>00142 <span class="comment"> **/</span>
<a name="l00143"></a><a class="code" href="../../d8/d8f/group__environment__information.html#g872c24341022407f606e48c7987f1d40">00143</a> <span class="preprocessor">#define MOC_VERSION 0</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00145"></a>00145 <span class="comment">/**</span>
<a name="l00146"></a>00146 <span class="comment"> * Minor version-number of this MOC-Implementation</span>
<a name="l00147"></a>00147 <span class="comment"> **/</span>
<a name="l00148"></a><a class="code" href="../../d8/d8f/group__environment__information.html#gd51bfe8de83ee5b0dad9f61c855ae666">00148</a> <span class="preprocessor">#define MOC_SUBVERSION 9</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">/**</span>
<a name="l00151"></a>00151 <span class="comment"> * The maximum length of the string returned by MOC_Get_processor_name.</span>
<a name="l00152"></a>00152 <span class="comment"> **/</span>
<a name="l00153"></a><a class="code" href="../../d8/d8f/group__environment__information.html#g58f559d6df810dbe1c633b3d68e9624f">00153</a> <span class="preprocessor">#define MOC_MAX_PROCESSOR_NAME 4</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00155"></a>00155 <span class="comment">/**</span>
<a name="l00156"></a>00156 <span class="comment"> * Gets the name of the processor.</span>
<a name="l00157"></a>00157 <span class="comment"> *</span>
<a name="l00158"></a>00158 <span class="comment"> * \note This function returns "SPU" if the calling process is running on a SPU otherwise</span>
<a name="l00159"></a>00159 <span class="comment"> * it's running on the "PPU".</span>
<a name="l00160"></a>00160 <span class="comment"> *</span>
<a name="l00161"></a>00161 <span class="comment"> * \param name \b out Specifies the processor-type the calling process is runnning on</span>
<a name="l00162"></a>00162 <span class="comment"> * \param resultlen \b out Length (in characters) of the name</span>
<a name="l00163"></a>00163 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00164"></a>00164 <span class="comment"> **/</span>
<a name="l00165"></a>00165 <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="l00166"></a>00166 <span class="comment"></span>
<a name="l00167"></a>00167 <span class="comment">/**</span>
<a name="l00168"></a>00168 <span class="comment"> * Returns the major and minor version of this MOC-implementation.</span>
<a name="l00169"></a>00169 <span class="comment"> *</span>
<a name="l00170"></a>00170 <span class="comment"> * \note Can be called before MOC_Init and after MOC_Finalize.</span>
<a name="l00171"></a>00171 <span class="comment"> *</span>
<a name="l00172"></a>00172 <span class="comment"> * @param version \b out Major version of this MOC-implementation</span>
<a name="l00173"></a>00173 <span class="comment"> * @param subversion \b out Minor version of this MOC-implementation</span>
<a name="l00174"></a>00174 <span class="comment"> * @retval MOC_SUCCESS Function returned successfully</span>
<a name="l00175"></a>00175 <span class="comment"> **/</span>
<a name="l00176"></a>00176 <span class="keywordtype">int</span> <a class="code" href="../../d8/d8f/group__environment__information.html#g9a54df3ad074f8fc91abddf7666474ea" title="Returns the major and minor version of this MOC-implementation.">MOC_Get_version</a>(<span class="keywordtype">int</span> *version, <span class="keywordtype">int</span> *subversion);
<a name="l00177"></a>00177 <span class="comment"></span>
<a name="l00178"></a>00178 <span class="comment">//@}</span>
<a name="l00179"></a>00179 <span class="comment"></span>
<a name="l00180"></a>00180
<a name="l00181"></a>00181
<a name="l00182"></a>00182
<a name="l00183"></a>00183 <span class="comment"></span>
<a name="l00184"></a>00184 <span class="comment">/**</span>
<a name="l00185"></a>00185 <span class="comment"> * \addtogroup environment_startup</span>
<a name="l00186"></a>00186 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00187"></a>00187 <span class="comment">//@{</span>
<a name="l00188"></a>00188 <span class="comment"></span><span class="comment">/**</span>
<a name="l00189"></a>00189 <span class="comment"> * @name PPU &amp; SPU</span>
<a name="l00190"></a>00190 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">//@{</span>
<a name="l00192"></a>00192 <span class="comment"></span><span class="comment"></span>
<a name="l00193"></a>00193 <span class="comment">/**</span>
<a name="l00194"></a>00194 <span class="comment"> * Terminates MPI execution environment.</span>
<a name="l00195"></a>00195 <span class="comment"> *</span>
<a name="l00196"></a>00196 <span class="comment"> * \note All processes must call this routine before exiting.</span>
<a name="l00197"></a>00197 <span class="comment"> *</span>
<a name="l00198"></a>00198 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00199"></a>00199 <span class="comment"> **/</span>
<a name="l00200"></a>00200 <span class="keywordtype">int</span> <a class="code" href="../../d8/d9a/group__environment__startup.html#g0fd366b8b49db32818786c773c4919b8" title="Terminates MPI execution environment.">MOC_Finalize</a> (<span class="keywordtype">void</span>);
<a name="l00201"></a>00201 <span class="comment"></span>
<a name="l00202"></a>00202 <span class="comment">//@}</span>
<a name="l00203"></a>00203 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00204"></a>00204 <span class="comment"></span>
<a name="l00205"></a>00205
<a name="l00206"></a>00206
<a name="l00207"></a>00207
<a name="l00208"></a>00208 <span class="comment"></span>
<a name="l00209"></a>00209 <span class="comment">/**</span>
<a name="l00210"></a>00210 <span class="comment"> * \addtogroup p2p_status</span>
<a name="l00211"></a>00211 <span class="comment"> *</span>
<a name="l00212"></a>00212 <span class="comment"> * Receiving operations return a status-object holding information about</span>
<a name="l00213"></a>00213 <span class="comment"> * the message.</span>
<a name="l00214"></a>00214 <span class="comment"> *</span>
<a name="l00215"></a>00215 <span class="comment"> * There are three Fields of the status-Struct which are predefined by the MPI-Standard:</span>
<a name="l00216"></a>00216 <span class="comment"> * MOC_SOURCE gives the message-source, MOC_TAG gives the message-tag and MOC_ERROR gives</span>
<a name="l00217"></a>00217 <span class="comment"> * an error-code (not implemented by MOC at the moment). To get the number of element the</span>
<a name="l00218"></a>00218 <span class="comment"> * function \ref MOC_Get_count should be used.</span>
<a name="l00219"></a>00219 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00220"></a>00220 <span class="comment">//@{</span>
<a name="l00221"></a>00221 <span class="comment"></span><span class="comment"></span>
<a name="l00222"></a>00222 <span class="comment">/**</span>
<a name="l00223"></a>00223 <span class="comment"> * Structure holding information about a received message.</span>
<a name="l00224"></a>00224 <span class="comment"> **/</span>
<a name="l00225"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html">00225</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status_struct</a>
<a name="l00226"></a>00226 {
<a name="l00227"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661">00227</a> uint8_t <a class="code" href="../../dd/d7a/structMOC__Status__struct.html#1a3fde58aca11d3b901c890916371661" title="message-source">MOC_SOURCE</a>; <span class="comment">/**&lt; message-source */</span>
<a name="l00228"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0">00228</a> uint8_t <a class="code" href="../../dd/d7a/structMOC__Status__struct.html#ae670a7f91ed4d4326bfda4f17ee14f0" title="message-tag">MOC_TAG</a>; <span class="comment">/**&lt; message-tag */</span>
<a name="l00229"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2">00229</a> <span class="keywordtype">int</span> <a class="code" href="../../dd/d7a/structMOC__Status__struct.html#3d3497f7a93c00e6800da9500e52daf2" title="error-code">MOC_ERROR</a>; <span class="comment">/**&lt; error-code */</span>
<a name="l00230"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384">00230</a> <span class="keywordtype">int</span> <a class="code" href="../../dd/d7a/structMOC__Status__struct.html#872c34c85569926730eebe10e47af384" title="message-size in byte (internal-variable)">message_size</a>; <span class="comment">/**&lt; message-size in byte (internal-variable) */</span>
<a name="l00231"></a><a class="code" href="../../dd/d7a/structMOC__Status__struct.html#c84605b34d90e4fde486028fa8b00853">00231</a> uint8_t <a class="code" href="../../dd/d7a/structMOC__Status__struct.html#c84605b34d90e4fde486028fa8b00853" title="message-ID (internal-variable)">mid</a>; <span class="comment">/**&lt; message-ID (internal-variable) */</span>
<a name="l00232"></a>00232 } <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a>; <span class="comment">/**&lt; */</span>
<a name="l00233"></a>00233 <span class="comment"></span>
<a name="l00234"></a>00234 <span class="comment">/**</span>
<a name="l00235"></a>00235 <span class="comment"> * Gets the number of received elements which is encoded in MOC_Status.</span>
<a name="l00236"></a>00236 <span class="comment"> *</span>
<a name="l00237"></a>00237 <span class="comment"> * @param status \b in status-object</span>
<a name="l00238"></a>00238 <span class="comment"> * @param datatype \b in Type of received elements</span>
<a name="l00239"></a>00239 <span class="comment"> * @param count \b out Number of received elements</span>
<a name="l00240"></a>00240 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00241"></a>00241 <span class="comment"> * @retval ... error-code</span>
<a name="l00242"></a>00242 <span class="comment"> **/</span>
<a name="l00243"></a>00243 <span class="keywordtype">int</span> <a class="code" href="../../da/df0/group__p2p__status.html#g0766bc2817b17dcdc8b7e830828fe118" title="Gets the number of received elements which is encoded in MOC_Status.">MOC_Get_count</a>(<a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status, <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> *count);
<a name="l00244"></a>00244 <span class="comment"></span>
<a name="l00245"></a>00245 <span class="comment">//@}</span>
<a name="l00246"></a>00246 <span class="comment"></span>
<a name="l00247"></a>00247
<a name="l00248"></a>00248
<a name="l00249"></a>00249
<a name="l00250"></a>00250
<a name="l00251"></a>00251
<a name="l00252"></a>00252 <span class="comment"></span>
<a name="l00253"></a>00253 <span class="comment">/**</span>
<a name="l00254"></a>00254 <span class="comment"> * \addtogroup comm_main</span>
<a name="l00255"></a>00255 <span class="comment"> *</span>
<a name="l00256"></a>00256 <span class="comment"> * \details</span>
<a name="l00257"></a>00257 <span class="comment"> * Currently there is no support for creating and managing user-defined groups and</span>
<a name="l00258"></a>00258 <span class="comment"> * communicators and probably never will be. The local storage of a SPU is very small</span>
<a name="l00259"></a>00259 <span class="comment"> * and also the maximal number of nodes is limited to a small number and so there is</span>
<a name="l00260"></a>00260 <span class="comment"> * doubt if the benefits will be greater than the overhead introduced by supporting</span>
<a name="l00261"></a>00261 <span class="comment"> * user-defined groups and communicators.</span>
<a name="l00262"></a>00262 <span class="comment"> *</span>
<a name="l00263"></a>00263 <span class="comment"> * Only the predefined communicators \ref MOC_COMM_WORLD, \ref MOC_COMM_SELF and</span>
<a name="l00264"></a>00264 <span class="comment"> * \ref MOC_COMM_NULL are available.</span>
<a name="l00265"></a>00265 <span class="comment"> *</span>
<a name="l00266"></a>00266 <span class="comment"> * The only operations which are currently implemented are \ref MOC_Comm_size and \ref</span>
<a name="l00267"></a>00267 <span class="comment"> * MOC_Comm_rank.</span>
<a name="l00268"></a>00268 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00269"></a>00269 <span class="comment">/**</span>
<a name="l00270"></a>00270 <span class="comment"> * \addtogroup comm_mgt</span>
<a name="l00271"></a>00271 <span class="comment"> *</span>
<a name="l00272"></a>00272 <span class="comment"> * Funktions for managing communicators. Because of reasons already stated (see \ref comm_main)</span>
<a name="l00273"></a>00273 <span class="comment"> * there is no support for user-defined communicators. So this section is limited to functions</span>
<a name="l00274"></a>00274 <span class="comment"> * which return the size of a specific communicator or the rank of the calling process.</span>
<a name="l00275"></a>00275 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00276"></a>00276 <span class="comment">//@{</span>
<a name="l00277"></a>00277 <span class="comment"></span><span class="comment"></span>
<a name="l00278"></a>00278 <span class="comment">/**</span>
<a name="l00279"></a>00279 <span class="comment"> * Communicator-Handle.</span>
<a name="l00280"></a>00280 <span class="comment"> *</span>
<a name="l00281"></a>00281 <span class="comment"> * Masks the actual type which is used to encode the communicator.</span>
<a name="l00282"></a>00282 <span class="comment"> * Char is used and therefore the maximum number of possible communicators is limited to 256.</span>
<a name="l00283"></a>00283 <span class="comment"> * But because there are three predefined communicators (MPI_COMM_NULL, MPI_COMM_WORLD and</span>
<a name="l00284"></a>00284 <span class="comment"> * MPI_COMM_SELF) only 253 user-defined communicators are possible.</span>
<a name="l00285"></a>00285 <span class="comment"> **/</span>
<a name="l00286"></a><a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">00286</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a>;
<a name="l00287"></a>00287 <span class="comment"></span>
<a name="l00288"></a>00288 <span class="comment">/**</span>
<a name="l00289"></a>00289 <span class="comment"> * Specifies a null communicator.</span>
<a name="l00290"></a>00290 <span class="comment"> **/</span>
<a name="l00291"></a><a class="code" href="../../d1/dd1/group__comm__mgt.html#gcae012270d1813b9153b8cbc78a5c84d">00291</a> <span class="preprocessor">#define MOC_COMM_NULL 0</span>
<a name="l00292"></a>00292 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00293"></a>00293 <span class="comment">/**</span>
<a name="l00294"></a>00294 <span class="comment"> * Specifies a constant that contains all of the processes.</span>
<a name="l00295"></a>00295 <span class="comment"> **/</span>
<a name="l00296"></a><a class="code" href="../../d1/dd1/group__comm__mgt.html#g14e1cb53b99b5e239d4cc6a8d370ad94">00296</a> <span class="preprocessor">#define MOC_COMM_WORLD 1</span>
<a name="l00297"></a>00297 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00298"></a>00298 <span class="comment">/**</span>
<a name="l00299"></a>00299 <span class="comment"> * Specifies a constant that contains only the calling process.</span>
<a name="l00300"></a>00300 <span class="comment"> **/</span>
<a name="l00301"></a><a class="code" href="../../d1/dd1/group__comm__mgt.html#gf8c5dfb6bb79027948fe63f4cf6504eb">00301</a> <span class="preprocessor">#define MOC_COMM_SELF 2</span>
<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00303"></a>00303 <span class="comment">/**</span>
<a name="l00304"></a>00304 <span class="comment"> * Determines the rank of the calling process in the communicator.</span>
<a name="l00305"></a>00305 <span class="comment"> *</span>
<a name="l00306"></a>00306 <span class="comment"> * \param comm \b in commicator-handle</span>
<a name="l00307"></a>00307 <span class="comment"> * \param rank \b out rank of the calling process in group of comm</span>
<a name="l00308"></a>00308 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00309"></a>00309 <span class="comment"> * \retval MOC_ERR_COMM Invalid communicator. A common error is to use a null communicator in a call.</span>
<a name="l00310"></a>00310 <span class="comment"> **/</span>
<a name="l00311"></a>00311 <span class="keywordtype">int</span> <a class="code" href="../../d1/dd1/group__comm__mgt.html#gbadd556e16667ac8ee86af72299e4915" title="Determines the rank of the calling process in the communicator.">MOC_Comm_rank</a> ( <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> *rank );
<a name="l00312"></a>00312 <span class="comment"></span>
<a name="l00313"></a>00313 <span class="comment">/**</span>
<a name="l00314"></a>00314 <span class="comment"> * Determines the size of the group associated with a communictor.</span>
<a name="l00315"></a>00315 <span class="comment"> *</span>
<a name="l00316"></a>00316 <span class="comment"> * \param comm \b in commicator-handle</span>
<a name="l00317"></a>00317 <span class="comment"> * \param size \b out number of processes in the group of comm</span>
<a name="l00318"></a>00318 <span class="comment"> * \retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00319"></a>00319 <span class="comment"> * \retval MOC_ERR_COMM Invalid communicator. A common error is to use a null communicator in a call.</span>
<a name="l00320"></a>00320 <span class="comment"> **/</span>
<a name="l00321"></a>00321 <span class="keywordtype">int</span> <a class="code" href="../../d1/dd1/group__comm__mgt.html#g36ac8a2d969216d52418aedd77a5829e" title="Determines the size of the group associated with a communictor.">MOC_Comm_size</a> ( <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> *size );
<a name="l00322"></a>00322 <span class="comment"></span>
<a name="l00323"></a>00323 <span class="comment">//@}</span>
<a name="l00324"></a>00324 <span class="comment"></span>
<a name="l00325"></a>00325
<a name="l00326"></a>00326
<a name="l00327"></a>00327
<a name="l00328"></a>00328
<a name="l00329"></a>00329 <span class="comment"></span>
<a name="l00330"></a>00330 <span class="comment">/**</span>
<a name="l00331"></a>00331 <span class="comment"> * \addtogroup environment_timer</span>
<a name="l00332"></a>00332 <span class="comment"> *</span>
<a name="l00333"></a>00333 <span class="comment"> * Functions to measure time.</span>
<a name="l00334"></a>00334 <span class="comment"> *</span>
<a name="l00335"></a>00335 <span class="comment"> * On the PPU gettimeofday from time.h is used. On the SPU either also gettimeofday or the</span>
<a name="l00336"></a>00336 <span class="comment"> * spu-timer-library is used depending on the configuration during compilation of the MOC-library.</span>
<a name="l00337"></a>00337 <span class="comment"> * When gettimeofday is used on the SPU the time is global in the MOC-environment with the</span>
<a name="l00338"></a>00338 <span class="comment"> * disadvantage that the SPU-threads get their times from the PPU using DMA causing inaccuracy and</span>
<a name="l00339"></a>00339 <span class="comment"> * delays.</span>
<a name="l00340"></a>00340 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00341"></a>00341 <span class="comment">//@{</span>
<a name="l00342"></a>00342 <span class="comment"></span><span class="comment"></span>
<a name="l00343"></a>00343 <span class="comment">/**</span>
<a name="l00344"></a>00344 <span class="comment"> * Returns a floating-point number of seconds, representing elapsed wall-clock</span>
<a name="l00345"></a>00345 <span class="comment"> * time since some time in the past.</span>
<a name="l00346"></a>00346 <span class="comment"> *</span>
<a name="l00347"></a>00347 <span class="comment"> * @return wall-clock time in seconds.</span>
<a name="l00348"></a>00348 <span class="comment"> **/</span>
<a name="l00349"></a>00349 <span class="keywordtype">double</span> <a class="code" href="../../d8/da6/group__environment__timer.html#g415b17505f06a12f26c6aa735d00158f" title="Returns a floating-point number of seconds, representing elapsed wall-clock time...">MOC_Wtime</a>(<span class="keywordtype">void</span>);
<a name="l00350"></a>00350 <span class="comment"></span>
<a name="l00351"></a>00351 <span class="comment">/**</span>
<a name="l00352"></a>00352 <span class="comment"> * Returns the resolution of Moc_Wtime in seconds.</span>
<a name="l00353"></a>00353 <span class="comment"> *</span>
<a name="l00354"></a>00354 <span class="comment"> * @return resolution in seconds.</span>
<a name="l00355"></a>00355 <span class="comment"> **/</span>
<a name="l00356"></a>00356 <span class="keywordtype">double</span> <a class="code" href="../../d8/da6/group__environment__timer.html#gc846a7a21aeafdc5e960e91cb7d602be" title="Returns the resolution of Moc_Wtime in seconds.">MOC_Wtick</a>(<span class="keywordtype">void</span>);
<a name="l00357"></a>00357 <span class="comment"></span>
<a name="l00358"></a>00358 <span class="comment">//@}</span>
<a name="l00359"></a>00359 <span class="comment"></span>
<a name="l00360"></a>00360
<a name="l00361"></a>00361
<a name="l00362"></a>00362
<a name="l00363"></a>00363
<a name="l00364"></a>00364
<a name="l00365"></a>00365 <span class="comment"></span>
<a name="l00366"></a>00366 <span class="comment">/**</span>
<a name="l00367"></a>00367 <span class="comment"> * \addtogroup p2p_main</span>
<a name="l00368"></a>00368 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00369"></a>00369 <span class="comment">//@{</span>
<a name="l00370"></a>00370 <span class="comment"></span><span class="comment"></span>
<a name="l00371"></a>00371 <span class="comment">/**</span>
<a name="l00372"></a>00372 <span class="comment"> * Indicates, at which message-size \ref MOC_Send switches to synchronous send.</span>
<a name="l00373"></a>00373 <span class="comment"> */</span>
<a name="l00374"></a><a class="code" href="../../d0/d64/group__p2p__main.html#g1efd7c092411ed106006e6a75a1de78b">00374</a> <span class="preprocessor">#define MOC_SEND_TRESHOLD 4096</span>
<a name="l00375"></a>00375 <span class="preprocessor"></span>
<a name="l00376"></a>00376 <span class="comment"></span>
<a name="l00377"></a>00377 <span class="comment">/**</span>
<a name="l00378"></a>00378 <span class="comment"> * Performs a blocking standard mode send operation.</span>
<a name="l00379"></a>00379 <span class="comment"> *</span>
<a name="l00380"></a>00380 <span class="comment"> * \note This routine may block until the message is received.</span>
<a name="l00381"></a>00381 <span class="comment"> *</span>
<a name="l00382"></a>00382 <span class="comment"> * @param buf \b in Pointer to buffer where data is stored</span>
<a name="l00383"></a>00383 <span class="comment"> * @param count \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00384"></a>00384 <span class="comment"> * @param datatype \b in Type of elements to be send</span>
<a name="l00385"></a>00385 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00386"></a>00386 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00387"></a>00387 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00388"></a>00388 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00389"></a>00389 <span class="comment"> * @retval ... error-code</span>
<a name="l00390"></a>00390 <span class="comment"> **/</span>
<a name="l00391"></a>00391 <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 class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm);
<a name="l00392"></a>00392 <span class="comment"></span>
<a name="l00393"></a>00393 <span class="comment">/**</span>
<a name="l00394"></a>00394 <span class="comment"> * Performs a blocking standard mode receive operation.</span>
<a name="l00395"></a>00395 <span class="comment"> *</span>
<a name="l00396"></a>00396 <span class="comment"> * \note This routine blocks until the message is received.</span>
<a name="l00397"></a>00397 <span class="comment"> *</span>
<a name="l00398"></a>00398 <span class="comment"> * @param buf \b inout Buffer into which data should be stored</span>
<a name="l00399"></a>00399 <span class="comment"> * @param count \b in Number of elements in receive buffer (not equal to actual byte-value)</span>
<a name="l00400"></a>00400 <span class="comment"> * @param datatype \b in Datatype of each receive buffer element</span>
<a name="l00401"></a>00401 <span class="comment"> * @param source \b in Rank of source</span>
<a name="l00402"></a>00402 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00403"></a>00403 <span class="comment"> * @param comm \b in Communicator of message</span>
<a name="l00404"></a>00404 <span class="comment"> * @param status \b inout Object holding status-information (has to be allocated by user)</span>
<a name="l00405"></a>00405 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00406"></a>00406 <span class="comment"> * @retval ... error-code</span>
<a name="l00407"></a>00407 <span class="comment"> **/</span>
<a name="l00408"></a>00408 <span class="keywordtype">int</span> <a class="code" href="../../d0/d64/group__p2p__main.html#g30c532510cffd36acd1b9b0b3edb3832" title="Performs a blocking standard mode receive operation.">MOC_Recv</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> source, <span class="keywordtype">int</span> tag,
<a name="l00409"></a>00409 <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00410"></a>00410 <span class="comment"></span>
<a name="l00411"></a>00411 <span class="comment">/**</span>
<a name="l00412"></a>00412 <span class="comment"> * Waits till a message is received and returns information without actually</span>
<a name="l00413"></a>00413 <span class="comment"> * receiving the message.</span>
<a name="l00414"></a>00414 <span class="comment"> *</span>
<a name="l00415"></a>00415 <span class="comment"> * @param source \b in source of message</span>
<a name="l00416"></a>00416 <span class="comment"> * @param tag \b in message-tag</span>
<a name="l00417"></a>00417 <span class="comment"> * @param comm \b in communicator</span>
<a name="l00418"></a>00418 <span class="comment"> * @param status \b out status-object holding information about message</span>
<a name="l00419"></a>00419 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00420"></a>00420 <span class="comment"> * @retval ... error-code</span>
<a name="l00421"></a>00421 <span class="comment"> **/</span>
<a name="l00422"></a>00422 <span class="keywordtype">int</span> <a class="code" href="../../d0/d64/group__p2p__main.html#g39ceb4e6f08da2cd3dac3e93bb6e3ee1" title="Waits till a message is received and returns information without actually receiving...">MOC_Probe</a>(<span class="keywordtype">int</span> source, <span class="keywordtype">int</span> tag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00423"></a>00423 <span class="comment"></span>
<a name="l00424"></a>00424 <span class="comment">/**</span>
<a name="l00425"></a>00425 <span class="comment"> * Tests if a message is available and returns information without actually</span>
<a name="l00426"></a>00426 <span class="comment"> * receiving the message.</span>
<a name="l00427"></a>00427 <span class="comment"> *</span>
<a name="l00428"></a>00428 <span class="comment"> * @param source \b in source of message</span>
<a name="l00429"></a>00429 <span class="comment"> * @param tag \b in message-tag</span>
<a name="l00430"></a>00430 <span class="comment"> * @param comm \b in communicator</span>
<a name="l00431"></a>00431 <span class="comment"> * @param flag \b out boolean value telling if a message is available</span>
<a name="l00432"></a>00432 <span class="comment"> * @param status \b out status-object holding information about message</span>
<a name="l00433"></a>00433 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00434"></a>00434 <span class="comment"> * @retval ... error-code</span>
<a name="l00435"></a>00435 <span class="comment"> **/</span>
<a name="l00436"></a>00436 <span class="keywordtype">int</span> <a class="code" href="../../d0/d64/group__p2p__main.html#g0bc7e537cd866537357a01a12a115a84" title="Tests if a message is available and returns information without actually receiving...">MOC_Iprobe</a>(<span class="keywordtype">int</span> source, <span class="keywordtype">int</span> tag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <span class="keywordtype">int</span> *flag, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00437"></a>00437 <span class="comment"></span>
<a name="l00438"></a>00438 <span class="comment">//@}</span>
<a name="l00439"></a>00439 <span class="comment"></span>
<a name="l00440"></a>00440
<a name="l00441"></a>00441
<a name="l00442"></a>00442
<a name="l00443"></a>00443
<a name="l00444"></a>00444 <span class="comment"></span>
<a name="l00445"></a>00445 <span class="comment">/**</span>
<a name="l00446"></a>00446 <span class="comment"> * \addtogroup p2p_synch</span>
<a name="l00447"></a>00447 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00448"></a>00448 <span class="comment">//@{</span>
<a name="l00449"></a>00449 <span class="comment"></span><span class="comment"></span>
<a name="l00450"></a>00450 <span class="comment">/**</span>
<a name="l00451"></a>00451 <span class="comment"> * Performs a blocking synchronous mode send operation.</span>
<a name="l00452"></a>00452 <span class="comment"> *</span>
<a name="l00453"></a>00453 <span class="comment"> * \note This routine blocks until the message is received.</span>
<a name="l00454"></a>00454 <span class="comment"> *</span>
<a name="l00455"></a>00455 <span class="comment"> * @param buf \b in Pointer to buffer where data is stored</span>
<a name="l00456"></a>00456 <span class="comment"> * @param count \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00457"></a>00457 <span class="comment"> * @param datatype \b in Type of elements to be send</span>
<a name="l00458"></a>00458 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00459"></a>00459 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00460"></a>00460 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00461"></a>00461 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00462"></a>00462 <span class="comment"> * @retval ... error-code</span>
<a name="l00463"></a>00463 <span class="comment"> **/</span>
<a name="l00464"></a>00464 <span class="keywordtype">int</span> <a class="code" href="../../d5/dc2/group__p2p__synch.html#g46cb2ff2b5a0601165978598932d6120" title="Performs a blocking synchronous mode send operation.">MOC_Ssend</a>(<span class="keywordtype">void</span>* buf, <span class="keywordtype">int</span> count, <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> datatype, <span class="keywordtype">int</span> dest, <span class="keywordtype">int</span> tag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm);
<a name="l00465"></a>00465 <span class="comment"></span>
<a name="l00466"></a>00466 <span class="comment">//@}</span>
<a name="l00467"></a>00467 <span class="comment"></span>
<a name="l00468"></a>00468
<a name="l00469"></a>00469
<a name="l00470"></a>00470
<a name="l00471"></a>00471 <span class="comment"></span>
<a name="l00472"></a>00472 <span class="comment">/**</span>
<a name="l00473"></a>00473 <span class="comment"> * \addtogroup p2p_buffered</span>
<a name="l00474"></a>00474 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00475"></a>00475 <span class="comment">//@{</span>
<a name="l00476"></a>00476 <span class="comment"></span><span class="comment"></span>
<a name="l00477"></a>00477 <span class="comment">/**</span>
<a name="l00478"></a>00478 <span class="comment"> * Performs a blocking buffered mode send operation.</span>
<a name="l00479"></a>00479 <span class="comment"> *</span>
<a name="l00480"></a>00480 <span class="comment"> * \note This routine blocks until the send-buffer is free.</span>
<a name="l00481"></a>00481 <span class="comment"> *</span>
<a name="l00482"></a>00482 <span class="comment"> * @param buf \b in Pointer to buffer where data is stored</span>
<a name="l00483"></a>00483 <span class="comment"> * @param count \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00484"></a>00484 <span class="comment"> * @param datatype \b in Type of elements to be send</span>
<a name="l00485"></a>00485 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00486"></a>00486 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00487"></a>00487 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00488"></a>00488 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00489"></a>00489 <span class="comment"> * @retval ... error-code</span>
<a name="l00490"></a>00490 <span class="comment"> **/</span>
<a name="l00491"></a>00491 <span class="keywordtype">int</span> <a class="code" href="../../de/d84/group__p2p__buffered.html#g307bf844e1416c7c021e4a3468209d0b" title="Performs a blocking buffered mode send operation.">MOC_Bsend</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 class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm);
<a name="l00492"></a>00492 <span class="comment"></span>
<a name="l00493"></a>00493 <span class="comment">//@}</span>
<a name="l00494"></a>00494 <span class="comment"></span>
<a name="l00495"></a>00495
<a name="l00496"></a>00496
<a name="l00497"></a>00497
<a name="l00498"></a>00498 <span class="comment"></span>
<a name="l00499"></a>00499 <span class="comment">/**</span>
<a name="l00500"></a>00500 <span class="comment"> * \addtogroup p2p_sendrecv</span>
<a name="l00501"></a>00501 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00502"></a>00502 <span class="comment">//@{</span>
<a name="l00503"></a>00503 <span class="comment"></span><span class="comment"></span>
<a name="l00504"></a>00504 <span class="comment">/**</span>
<a name="l00505"></a>00505 <span class="comment"> * Execute a blocking send and receive operation. Both send and receive use the same</span>
<a name="l00506"></a>00506 <span class="comment"> * communicator, but possibly different tags. The send buffer and receive buffers may</span>
<a name="l00507"></a>00507 <span class="comment"> * be disjoint, and may have different lengths and datatypes.</span>
<a name="l00508"></a>00508 <span class="comment"> *</span>
<a name="l00509"></a>00509 <span class="comment"> * @param sendbuf \b in Pointer to buffer where data is stored</span>
<a name="l00510"></a>00510 <span class="comment"> * @param sendcount \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00511"></a>00511 <span class="comment"> * @param sendtype \b in Type of elements to be send</span>
<a name="l00512"></a>00512 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00513"></a>00513 <span class="comment"> * @param sendtag \b in Tag of message to be send</span>
<a name="l00514"></a>00514 <span class="comment"> *</span>
<a name="l00515"></a>00515 <span class="comment"> * @param recvbuf \b inout Buffer into which data should be stored</span>
<a name="l00516"></a>00516 <span class="comment"> * @param recvcount \b in Number of elements in receive buffer (not equal to actual byte-value)</span>
<a name="l00517"></a>00517 <span class="comment"> * @param recvtype \b in Datatype of each receive buffer element</span>
<a name="l00518"></a>00518 <span class="comment"> * @param source \b in Rank of source</span>
<a name="l00519"></a>00519 <span class="comment"> * @param recvtag \b in Tag of message to be received</span>
<a name="l00520"></a>00520 <span class="comment"> *</span>
<a name="l00521"></a>00521 <span class="comment"> * @param comm \b in Communicator of message</span>
<a name="l00522"></a>00522 <span class="comment"> * @param status \b inout Object holding status-information (has to be allocated by user)</span>
<a name="l00523"></a>00523 <span class="comment"> *</span>
<a name="l00524"></a>00524 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00525"></a>00525 <span class="comment"> * @retval ... error-code</span>
<a name="l00526"></a>00526 <span class="comment"> **/</span>
<a name="l00527"></a>00527 <span class="keywordtype">int</span> <a class="code" href="../../d2/ded/group__p2p__sendrecv.html#g70885aadac98497e169267e74abee516" title="Execute a blocking send and receive operation.">MOC_Sendrecv</a>(<span class="keywordtype">void</span> *sendbuf, <span class="keywordtype">int</span> sendcount, <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> sendtype, <span class="keywordtype">int</span> dest,
<a name="l00528"></a>00528 <span class="keywordtype">int</span> sendtag, <span class="keywordtype">void</span> *recvbuf, <span class="keywordtype">int</span> recvcount, <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> recvtype,
<a name="l00529"></a>00529 <span class="keywordtype">int</span> source, <span class="keywordtype">int</span> recvtag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00530"></a>00530 <span class="comment"></span>
<a name="l00531"></a>00531 <span class="comment">/**</span>
<a name="l00532"></a>00532 <span class="comment"> * Execute a blocking send and receive. The same buffer is used both for the send</span>
<a name="l00533"></a>00533 <span class="comment"> * and for the receive, so that the message sent is replaced by the message</span>
<a name="l00534"></a>00534 <span class="comment"> * received.</span>
<a name="l00535"></a>00535 <span class="comment"> *</span>
<a name="l00536"></a>00536 <span class="comment"> * @param buf \b inout Pointer to buffer</span>
<a name="l00537"></a>00537 <span class="comment"> * @param count \b in Number of elements (not equal to actual byte-value)</span>
<a name="l00538"></a>00538 <span class="comment"> * @param datatype \b in Type of elements</span>
<a name="l00539"></a>00539 <span class="comment"> *</span>
<a name="l00540"></a>00540 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00541"></a>00541 <span class="comment"> * @param sendtag \b in Tag of message to be send</span>
<a name="l00542"></a>00542 <span class="comment"> *</span>
<a name="l00543"></a>00543 <span class="comment"> * @param source \b in Rank of source</span>
<a name="l00544"></a>00544 <span class="comment"> * @param recvtag \b in Tag of message to be received</span>
<a name="l00545"></a>00545 <span class="comment"> *</span>
<a name="l00546"></a>00546 <span class="comment"> * @param comm \b in Communicator of message</span>
<a name="l00547"></a>00547 <span class="comment"> * @param status \b inout Object holding status-information (has to be allocated by user)</span>
<a name="l00548"></a>00548 <span class="comment"> *</span>
<a name="l00549"></a>00549 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00550"></a>00550 <span class="comment"> * @retval ... error-code</span>
<a name="l00551"></a>00551 <span class="comment"> **/</span>
<a name="l00552"></a>00552 <span class="keywordtype">int</span> <a class="code" href="../../d2/ded/group__p2p__sendrecv.html#g1e5b32eaefd61f863f89778dcbbb70a2" title="Execute a blocking send and receive.">MOC_Sendrecv_replace</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,
<a name="l00553"></a>00553 <span class="keywordtype">int</span> sendtag, <span class="keywordtype">int</span> source, <span class="keywordtype">int</span> recvtag, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm,
<a name="l00554"></a>00554 <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00555"></a>00555 <span class="comment"></span>
<a name="l00556"></a>00556 <span class="comment">//@}</span>
<a name="l00557"></a>00557 <span class="comment"></span>
<a name="l00558"></a>00558
<a name="l00559"></a>00559
<a name="l00560"></a>00560 <span class="comment"></span>
<a name="l00561"></a>00561 <span class="comment">/**</span>
<a name="l00562"></a>00562 <span class="comment"> * \addtogroup p2p_imm</span>
<a name="l00563"></a>00563 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00564"></a>00564 <span class="comment">//@{</span>
<a name="l00565"></a>00565 <span class="comment"></span><span class="comment"></span>
<a name="l00566"></a>00566 <span class="comment">/**</span>
<a name="l00567"></a>00567 <span class="comment"> * Communication-Request (Handle)</span>
<a name="l00568"></a>00568 <span class="comment"> **/</span>
<a name="l00569"></a><a class="code" href="../../db/d17/structmoc__request__struct.html">00569</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">moc_request_struct</a>
<a name="l00570"></a>00570 {
<a name="l00571"></a><a class="code" href="../../db/d17/structmoc__request__struct.html#56ab14d3df6e8c232e66aec78be949f3">00571</a> <span class="keywordtype">int</span> <a class="code" href="../../db/d17/structmoc__request__struct.html#56ab14d3df6e8c232e66aec78be949f3">request_type</a>;
<a name="l00572"></a>00572 <span class="keyword">union</span>
<a name="l00573"></a>00573 {
<a name="l00574"></a><a class="code" href="../../db/d17/structmoc__request__struct.html#b2b561710b814f4804bce54568b67cfe">00574</a> <a class="code" href="../../d4/da3/structimoc__dma__request__struct.html">imoc_dma_request</a> <a class="code" href="../../db/d17/structmoc__request__struct.html#b2b561710b814f4804bce54568b67cfe">dma_data</a>;
<a name="l00575"></a><a class="code" href="../../db/d17/structmoc__request__struct.html#47db330291fdf4864201fe106ec53db8">00575</a> <a class="code" href="../../d9/d89/structimoc__issend__request__struct.html">imoc_issend_request</a> <a class="code" href="../../db/d17/structmoc__request__struct.html#47db330291fdf4864201fe106ec53db8">issend_request</a>;
<a name="l00576"></a>00576 } <a class="code" href="../../db/d17/structmoc__request__struct.html#4878ce199375f8a411520c887f908a4f">request_data</a> ;
<a name="l00577"></a>00577 } <a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> <span class="comment">/**&lt; Communication-Request (Handle) */</span>;
<a name="l00578"></a>00578 <span class="comment"></span>
<a name="l00579"></a>00579 <span class="comment">/**</span>
<a name="l00580"></a>00580 <span class="comment"> * Performs a non-blocking standard mode send operation.</span>
<a name="l00581"></a>00581 <span class="comment"> *</span>
<a name="l00582"></a>00582 <span class="comment"> * \note This routine returns as soon as possible.</span>
<a name="l00583"></a>00583 <span class="comment"> *</span>
<a name="l00584"></a>00584 <span class="comment"> * @param buf \b in Pointer to buffer where data is stored</span>
<a name="l00585"></a>00585 <span class="comment"> * @param count \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00586"></a>00586 <span class="comment"> * @param datatype \b in Type of elements to be send</span>
<a name="l00587"></a>00587 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00588"></a>00588 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00589"></a>00589 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00590"></a>00590 <span class="comment"> * @param request \b out communication request (handle)</span>
<a name="l00591"></a>00591 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00592"></a>00592 <span class="comment"> * @retval ... error-code</span>
<a name="l00593"></a>00593 <span class="comment"> **/</span>
<a name="l00594"></a>00594 <span class="keywordtype">int</span> <a class="code" href="../../d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af" title="Performs a non-blocking standard mode send operation.">MOC_ISend</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 class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm,
<a name="l00595"></a>00595 <a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request);
<a name="l00596"></a>00596 <span class="comment"></span>
<a name="l00597"></a>00597 <span class="comment">/**</span>
<a name="l00598"></a>00598 <span class="comment"> * Performs a non-blocking synchronous mode send operation.</span>
<a name="l00599"></a>00599 <span class="comment"> *</span>
<a name="l00600"></a>00600 <span class="comment"> * \note This routine returns as soon as possible (After the message-envelope has</span>
<a name="l00601"></a>00601 <span class="comment"> * been written into the receiver's message-queue).</span>
<a name="l00602"></a>00602 <span class="comment"> *</span>
<a name="l00603"></a>00603 <span class="comment"> * @param buf \b in Pointer to buffer where data is stored</span>
<a name="l00604"></a>00604 <span class="comment"> * @param count \b in Number of elements to be send (not equal to actual byte-value)</span>
<a name="l00605"></a>00605 <span class="comment"> * @param datatype \b in Type of elements to be send</span>
<a name="l00606"></a>00606 <span class="comment"> * @param dest \b in Rank of receiving process</span>
<a name="l00607"></a>00607 <span class="comment"> * @param tag \b in Tag of message</span>
<a name="l00608"></a>00608 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00609"></a>00609 <span class="comment"> * @param request \b out communication request (handle)</span>
<a name="l00610"></a>00610 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00611"></a>00611 <span class="comment"> * @retval ... error-code</span>
<a name="l00612"></a>00612 <span class="comment"> **/</span>
<a name="l00613"></a>00613 <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 class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm,
<a name="l00614"></a>00614 <a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request);
<a name="l00615"></a>00615 <span class="comment"></span>
<a name="l00616"></a>00616 <span class="comment">/**</span>
<a name="l00617"></a>00617 <span class="comment"> * Tests, if a non-blocking communication has been completed.</span>
<a name="l00618"></a>00618 <span class="comment"> *</span>
<a name="l00619"></a>00619 <span class="comment"> * @param request \b in Communication-Request (Handle)</span>
<a name="l00620"></a>00620 <span class="comment"> * @param flag \b out true, if communication-request has been completed</span>
<a name="l00621"></a>00621 <span class="comment"> * @param status \b out Object holding status-information</span>
<a name="l00622"></a>00622 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00623"></a>00623 <span class="comment"> * @retval ... error-code</span>
<a name="l00624"></a>00624 <span class="comment"> **/</span>
<a name="l00625"></a>00625 <span class="keywordtype">int</span> <a class="code" href="../../d7/d62/group__p2p__imm.html#g5ee1f1c1275717d2dc78d6058ff81e9e" title="Tests, if a non-blocking communication has been completed.">MOC_Test</a>(<a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request, <span class="keywordtype">int</span> *flag, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00626"></a>00626 <span class="comment"></span>
<a name="l00627"></a>00627 <span class="comment">/**</span>
<a name="l00628"></a>00628 <span class="comment"> * Wait till a non-blocking communication has been completed.</span>
<a name="l00629"></a>00629 <span class="comment"> *</span>
<a name="l00630"></a>00630 <span class="comment"> * @param request \b in Communication-Request (Handle)</span>
<a name="l00631"></a>00631 <span class="comment"> * @param status \b out Object holding status-information</span>
<a name="l00632"></a>00632 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00633"></a>00633 <span class="comment"> * @retval ... error-code</span>
<a name="l00634"></a>00634 <span class="comment"> **/</span>
<a name="l00635"></a>00635 <span class="keywordtype">int</span> <a class="code" href="../../d7/d62/group__p2p__imm.html#g68043e4a0893fdc25c67f87bae1015a6" title="Wait till a non-blocking communication has been completed.">MOC_Wait</a>(<a class="code" href="../../db/d17/structmoc__request__struct.html" title="Communication-Request (Handle).">MOC_Request</a> *request, <a class="code" href="../../dd/d7a/structMOC__Status__struct.html" title="Structure holding information about a received message.">MOC_Status</a> *status);
<a name="l00636"></a>00636 <span class="comment"></span>
<a name="l00637"></a>00637 <span class="comment">//@}</span>
<a name="l00638"></a>00638 <span class="comment"></span>
<a name="l00639"></a>00639
<a name="l00640"></a>00640
<a name="l00641"></a>00641
<a name="l00642"></a>00642
<a name="l00643"></a>00643 <span class="comment"></span>
<a name="l00644"></a>00644 <span class="comment">/**</span>
<a name="l00645"></a>00645 <span class="comment"> * \addtogroup broadcast</span>
<a name="l00646"></a>00646 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00647"></a>00647 <span class="comment">//@{</span>
<a name="l00648"></a>00648 <span class="comment"></span><span class="comment"></span>
<a name="l00649"></a>00649 <span class="comment">/**</span>
<a name="l00650"></a>00650 <span class="comment"> * Broadcasts a message from the process with rank "root" to all other processes of the group.</span>
<a name="l00651"></a>00651 <span class="comment"> *</span>
<a name="l00652"></a>00652 <span class="comment"> * \note The broadcast-message can also be received by a MOC_Recv using MOC_BCAST_TAG.</span>
<a name="l00653"></a>00653 <span class="comment"> *</span>
<a name="l00654"></a>00654 <span class="comment"> * @param buffer \b inout starting address of buffer</span>
<a name="l00655"></a>00655 <span class="comment"> * @param count \b in number of elements to be send or received</span>
<a name="l00656"></a>00656 <span class="comment"> * @param datatype \b in Type of elements to be send or received</span>
<a name="l00657"></a>00657 <span class="comment"> * @param root \b in rank of the process who sends the broadcast-message</span>
<a name="l00658"></a>00658 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00659"></a>00659 <span class="comment"> **/</span>
<a name="l00660"></a>00660 <span class="keywordtype">int</span> <a class="code" href="../../db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &amp;quot;root&amp;quot; to all other processes...">MOC_Bcast</a>(<span class="keywordtype">void</span>* buffer, <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> root, <a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm );
<a name="l00661"></a>00661 <span class="comment"></span>
<a name="l00662"></a>00662 <span class="comment">/**</span>
<a name="l00663"></a>00663 <span class="comment"> * Blocks the caller until all processes in the communicator have called it; that is, the</span>
<a name="l00664"></a>00664 <span class="comment"> * call returns at any process only after all members of the communicator have entered the</span>
<a name="l00665"></a>00665 <span class="comment"> * call.</span>
<a name="l00666"></a>00666 <span class="comment"> *</span>
<a name="l00667"></a>00667 <span class="comment"> * @param comm \b in communicator of message</span>
<a name="l00668"></a>00668 <span class="comment"> * @retval MOC_SUCCESS No error; MPI routine completed successfully.</span>
<a name="l00669"></a>00669 <span class="comment"> * @retval ... error-code</span>
<a name="l00670"></a>00670 <span class="comment"> **/</span>
<a name="l00671"></a>00671 <span class="keywordtype">int</span> <a class="code" href="../../db/dc2/group__broadcast.html#g110b00d5a4d9f970ddf8e9bd4c2d8834" title="Blocks the caller until all processes in the communicator have called it; that is...">MOC_Barrier</a>(<a class="code" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767" title="Communicator-Handle.">MOC_Comm</a> comm );
<a name="l00672"></a>00672 <span class="comment"></span>
<a name="l00673"></a>00673 <span class="comment">//@}</span>
<a name="l00674"></a>00674 <span class="comment"></span>
<a name="l00675"></a>00675
<a name="l00676"></a>00676
<a name="l00677"></a>00677
<a name="l00678"></a>00678
<a name="l00679"></a>00679 <span class="preprocessor">#endif </span><span class="comment">/*MOC_H_*/</span>
<a name="l00680"></a>00680
</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,109 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): src/ppu/internal/dma/imoc_dma-get_ppu.c 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-get_ppu.c</h1><a href="../../d4/d2d/imoc__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="../../d2/de2/group__internal__p2p__dma.html#g53d36c567e4c98e5d258a7857096e7ab">00009</a> <span class="keywordtype">int</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g53d36c567e4c98e5d258a7857096e7ab" title="Internal wrapper-function for a blocking DMA-get operation.">IMOC_get_data</a>(<span class="keywordtype">void</span>* target, uint64_t source, uint32_t size, <span class="keywordtype">int</span> dest)
<a name="l00010"></a>00010 {
<a name="l00011"></a>00011 uint32_t remainder_16b;
<a name="l00012"></a>00012 uint32_t remainder_16kb;
<a name="l00013"></a>00013 uint32_t offset;
<a name="l00014"></a>00014 <span class="keywordtype">char</span> buffer[16] <a class="code" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&amp;quot;No nodes in list\n&amp;quot;);...">__attribute__</a>((__aligned__(16)));
<a name="l00015"></a>00015 <span class="keywordtype">int</span> err;
<a name="l00016"></a>00016 uint32_t dmastatus;
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="comment">/* transfers have to be multiples of 16 bytes */</span>
<a name="l00019"></a>00019 remainder_16b = size % 16;
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="comment">/* subtracting remainder means the transfer has a valid size now */</span>
<a name="l00022"></a>00022 size -= remainder_16b;
<a name="l00023"></a>00023 offset = 0;
<a name="l00024"></a>00024
<a name="l00025"></a>00025 <span class="comment">/* first case: transfer of size smaller than maximum allowed one (16kbyte) */</span>
<a name="l00026"></a>00026 <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="l00027"></a>00027 {
<a name="l00028"></a>00028 err = spe_mfcio_put(
<a name="l00029"></a>00029 <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, source,
<a name="l00030"></a>00030 target, size, 15, 0, 0);
<a name="l00031"></a>00031 <span class="keywordflow">if</span> (err)
<a name="l00032"></a>00032 <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="l00033"></a>00033 }
<a name="l00034"></a>00034 <span class="comment">/* second case: transfer of bigger size is simply split into parts of 16kb */</span>
<a name="l00035"></a>00035 <span class="keywordflow">else</span>
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 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="l00038"></a>00038 <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="l00039"></a>00039 {
<a name="l00040"></a>00040 err = spe_mfcio_put(
<a name="l00041"></a>00041 <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="l00042"></a>00042 source + offset, target + 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>, 15, 0,
<a name="l00043"></a>00043 0);
<a name="l00044"></a>00044 <span class="keywordflow">if</span> (err)
<a name="l00045"></a>00045 <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="l00046"></a>00046
<a name="l00047"></a>00047 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="l00048"></a>00048 }
<a name="l00049"></a>00049 <span class="keywordflow">if</span> (remainder_16kb &gt; 0)
<a name="l00050"></a>00050 {
<a name="l00051"></a>00051 err = spe_mfcio_put(
<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>[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="l00053"></a>00053 source + offset, target + offset, remainder_16kb, 15, 0, 0);
<a name="l00054"></a>00054 <span class="keywordflow">if</span> (err)
<a name="l00055"></a>00055 <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="l00056"></a>00056 }
<a name="l00057"></a>00057 }
<a name="l00058"></a>00058 <span class="comment">/* if size was reduced previously the remaining bytes have to be transfered */</span>
<a name="l00059"></a>00059 <span class="keywordflow">if</span> (remainder_16b &gt; 0)
<a name="l00060"></a>00060 {
<a name="l00061"></a>00061 <span class="comment">/* minimum allowed transfer is 16bytes so transfer this size into a buffer */</span>
<a name="l00062"></a>00062 err = spe_mfcio_put(
<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>[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, source
<a name="l00064"></a>00064 + size, buffer, 16, 15, 0, 0);
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (err)
<a name="l00066"></a>00066 <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="l00067"></a>00067 <span class="comment">/* waiting for dma completion necessary */</span>
<a name="l00068"></a>00068 err = spe_mfcio_tag_status_read(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[dest
<a name="l00069"></a>00069 - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>].speid, 0, SPE_TAG_ALL, &amp;dmastatus);
<a name="l00070"></a>00070 <span class="keywordflow">if</span> (err)
<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 <span class="comment">/* copy only the valid bytes into the target buffer */</span>
<a name="l00073"></a>00073 memcpy(target + size, buffer, remainder_16b);
<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 <span class="comment">/* waiting for dma completion necessary */</span>
<a name="l00078"></a>00078 err = spe_mfcio_tag_status_read(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[dest
<a name="l00079"></a>00079 - <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>].speid, 0, SPE_TAG_ALL, &amp;dmastatus);
<a name="l00080"></a>00080 <span class="keywordflow">if</span> (err)
<a name="l00081"></a>00081 <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="l00082"></a>00082
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g8a73ed6676bcf0c0607d98482ca1aca4" title="No error.">MOC_SUCCESS</a>;
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087
</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>