Initial commit.

This commit is contained in:
2017-10-26 19:57:24 +02:00
commit 9ce8b5485d
1090 changed files with 47036 additions and 0 deletions
@@ -0,0 +1,154 @@
<!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/ppu/imoc_core_ppu.h Source File</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>include/internal/ppu/imoc_core_ppu.h</h1><a href="../../d6/d09/imoc__core__ppu_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MOC_INTERNAL_CORE_PPU_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MOC_INTERNAL_CORE_PPU_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;libspe2.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;pthread.h&gt;</span>
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="preprocessor">#include "../imoc_core.h"</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include "../../ppu/moc.h"</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">/**</span>
<a name="l00015"></a>00015 <span class="comment"> * \addtogroup internal_core</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"></span><span class="comment">/**</span>
<a name="l00019"></a>00019 <span class="comment"> * @name PPU only</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"></span><span class="comment"></span>
<a name="l00023"></a>00023 <span class="comment">/**</span>
<a name="l00024"></a>00024 <span class="comment"> * Node-handle structure.</span>
<a name="l00025"></a>00025 <span class="comment"> * </span>
<a name="l00026"></a>00026 <span class="comment"> * \note PPU only</span>
<a name="l00027"></a>00027 <span class="comment"> * </span>
<a name="l00028"></a>00028 <span class="comment"> * Information each node knowns about himself and the world.</span>
<a name="l00029"></a>00029 <span class="comment"> **/</span>
<a name="l00030"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html">00030</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html" title="Node-handle structure.">moc_node_handle_ppu_struct</a>
<a name="l00031"></a>00031 {
<a name="l00032"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#9005ee3d6d0ee8b2f15628dcca724710">00032</a> uint8_t <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#9005ee3d6d0ee8b2f15628dcca724710" title="rank of node">rank</a>; <span class="comment">/**&lt; rank of node */</span>
<a name="l00033"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#3779cc1bda02c45a880389b109173778">00033</a> uint8_t <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#3779cc1bda02c45a880389b109173778" title="number of overall processes">comm_size</a>; <span class="comment">/**&lt; number of overall processes */</span>
<a name="l00034"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#ee1aa72cd99190cf97523a955cfa6141">00034</a> uint8_t <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#ee1aa72cd99190cf97523a955cfa6141" title="Size of a message-queue.">queue_size</a>; <span class="comment">/**&lt; Size of a message-queue */</span>
<a name="l00035"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#58ca7dd0e2874d0317038dbb0c279b82">00035</a> <span class="keyword">volatile</span> <a class="code" href="../../df/dd4/structmoc__message__envelope__struct.html" title="Message-envelope structure.">moc_message_envelope_t</a>* <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#58ca7dd0e2874d0317038dbb0c279b82" title="base-address of own message-queues">message_queue_base</a>; <span class="comment">/**&lt; base-address of own message-queues */</span>
<a name="l00036"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#abccbc7beefa7b1e2ccc84b8bd2b8805">00036</a> <span class="keyword">volatile</span> <a class="code" href="../../dd/df5/structmoc__message__status__struct.html" title="Message-status structure.">moc_message_status_t</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>; <span class="comment">/**&lt; base-address of own message-status-array */</span>
<a name="l00037"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#ee118aad604058291438923545af37db">00037</a> <span class="keywordtype">void</span>* <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#ee118aad604058291438923545af37db" title="base-address of own buffer">buffer_base</a>; <span class="comment">/**&lt; base-address of own buffer */</span>
<a name="l00038"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#90096c2a63d01f0251fdd6c642601f45">00038</a> uint32_t <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#90096c2a63d01f0251fdd6c642601f45" title="size of own buffer">buffer_size</a>; <span class="comment">/**&lt; size of own buffer */</span>
<a name="l00039"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#3d13ba21e187a05cb548b6b3ae39ffe7">00039</a> <span class="keyword">volatile</span> uint32_t* <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#3d13ba21e187a05cb548b6b3ae39ffe7" title="address of own signal-area">signal_area</a>; <span class="comment">/**&lt; address of own signal-area */</span>
<a name="l00040"></a><a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#528d5743c1b49553cc9b812a211afa53">00040</a> <span class="keyword">volatile</span> <a class="code" href="../../d0/db8/structmoc__process__struct.html" title="Process-information structure.">moc_process_t</a>* <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html#528d5743c1b49553cc9b812a211afa53" title="list of all other MOC-processes (index is rank of process)">moc_process_list</a>; <span class="comment">/**&lt; list of all other MOC-processes </span>
<a name="l00041"></a>00041 <span class="comment"> (index is rank of process) */</span>
<a name="l00042"></a>00042 } <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html" title="Node-handle structure.">moc_node_handle_ppu_t</a>; <span class="comment">/**&lt; typedef of \ref moc_node_handle_ppu_struct */</span>
<a name="l00043"></a>00043
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment"></span>
<a name="l00046"></a>00046 <span class="comment">/**</span>
<a name="l00047"></a>00047 <span class="comment"> * Information each node knowns about himself and the world.</span>
<a name="l00048"></a>00048 <span class="comment"> * </span>
<a name="l00049"></a>00049 <span class="comment"> * \note PPU only</span>
<a name="l00050"></a>00050 <span class="comment"> * </span>
<a name="l00051"></a>00051 <span class="comment"> **/</span>
<a name="l00052"></a><a class="code" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895">00052</a> <a class="code" href="../../d8/d93/structmoc__node__handle__ppu__struct.html" title="Node-handle structure.">moc_node_handle_ppu_t</a> <a class="code" href="../../dd/df8/group__internal__core.html#geed5a271d50368d3cf9a858c4f57c895" title="Information each node knowns about himself and the world.">node_handle</a>;
<a name="l00053"></a>00053 <span class="comment"></span>
<a name="l00054"></a>00054 <span class="comment">//@}</span>
<a name="l00055"></a>00055 <span class="comment"></span><span class="comment">//@}</span>
<a name="l00056"></a>00056 <span class="comment"></span>
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">/**</span>
<a name="l00060"></a>00060 <span class="comment"> * \addtogroup internal_spu_thread SPU-Thread Management</span>
<a name="l00061"></a>00061 <span class="comment"> * </span>
<a name="l00062"></a>00062 <span class="comment"> * \note PPU only</span>
<a name="l00063"></a>00063 <span class="comment"> **/</span><span class="comment"></span>
<a name="l00064"></a>00064 <span class="comment">//@{</span>
<a name="l00065"></a>00065 <span class="comment"></span><span class="comment"></span>
<a name="l00066"></a>00066 <span class="comment">/**</span>
<a name="l00067"></a>00067 <span class="comment"> * SPU-Thread structure.</span>
<a name="l00068"></a>00068 <span class="comment"> * </span>
<a name="l00069"></a>00069 <span class="comment"> * \note PPU only</span>
<a name="l00070"></a>00070 <span class="comment"> * </span>
<a name="l00071"></a>00071 <span class="comment"> * Stores information about the SPU-Threads the managing PPU-Process</span>
<a name="l00072"></a>00072 <span class="comment"> * needs to know.</span>
<a name="l00073"></a>00073 <span class="comment"> **/</span>
<a name="l00074"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html">00074</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html" title="SPU-Thread structure.">moc_spu_thread_struct</a>
<a name="l00075"></a>00075 {
<a name="l00076"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#610f1390167566df9b451401c0bb8667">00076</a> uint8_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#610f1390167566df9b451401c0bb8667" title="rank of SPU-thread">rank</a>; <span class="comment">/**&lt; rank of SPU-thread */</span>
<a name="l00077"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#47d2a05a8c7370dabb7653124bafd539">00077</a> pthread_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#47d2a05a8c7370dabb7653124bafd539" title="PThread-handle &amp;lt;.">pthread</a>; <span class="comment">/**&lt; PThread-handle &lt;*/</span>
<a name="l00078"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#61d6807e3bab9b37ef07b0543e33574e">00078</a> spe_context_ptr_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#61d6807e3bab9b37ef07b0543e33574e" title="SPE-Context.">speid</a>; <span class="comment">/**&lt; SPE-Context */</span>
<a name="l00079"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#ef9a368d969bbfc92bee4076b1576b34">00079</a> spe_stop_info_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#ef9a368d969bbfc92bee4076b1576b34" title="Error-Information.">stop_info</a>; <span class="comment">/**&lt; Error-Information */</span>
<a name="l00080"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#4d3f668b79c172907febb25dbe2813ea">00080</a> uint32_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#4d3f668b79c172907febb25dbe2813ea" title="Spe-entry-address.">spe_entry_adress</a>; <span class="comment">/**&lt; Spe-entry-address */</span>
<a name="l00081"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a7f667cf56fc5e3cd906caa8aab765cc">00081</a> <span class="keywordtype">void</span> *<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a7f667cf56fc5e3cd906caa8aab765cc" title="effective address of user-defined information in main-memory">argp</a>; <span class="comment">/**&lt; effective address of user-defined information</span>
<a name="l00082"></a>00082 <span class="comment"> in main-memory */</span>
<a name="l00083"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#603a62c8b05bb561c467e34acbcff2b5">00083</a> <span class="keywordtype">void</span> *<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#603a62c8b05bb561c467e34acbcff2b5" title="Pointer to environment information.">envp</a>; <span class="comment">/**&lt; Pointer to environment information */</span>
<a name="l00084"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a65e6d8f5252b43a69951b57305ebcbf">00084</a> <span class="keywordtype">void</span>* <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a65e6d8f5252b43a69951b57305ebcbf" title="base-address of the SPU-Thread&amp;#39;s buffer">buffer_base</a>; <span class="comment">/**&lt; base-address of the SPU-Thread's buffer */</span>
<a name="l00085"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#67de0b34d22a702f8d06c0c26e01cc46">00085</a> uint32_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#67de0b34d22a702f8d06c0c26e01cc46" title="size of the SPU-Thread&amp;#39;s buffer">buffer_size</a>; <span class="comment">/**&lt; size of the SPU-Thread's buffer */</span>
<a name="l00086"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a1af310737612cbf58480cbb172e33c4">00086</a> uint64_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a1af310737612cbf58480cbb172e33c4" title="Effective Basis-Address of SPU&amp;#39;s local-storage.">ls_base</a>; <span class="comment">/**&lt; Effective Basis-Address of SPU's local-storage */</span>
<a name="l00087"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#0813ce58844b7a7d6df0341e5e1c1b17">00087</a> uint32_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#0813ce58844b7a7d6df0341e5e1c1b17" title="Address of message-queue in SPU&amp;#39;s local-storage.">queue_base_in_ls</a>; <span class="comment">/**&lt; Address of message-queue in SPU's local-storage */</span>
<a name="l00088"></a><a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#93433bc21fa8fc6b7f65251a5cf33eb1">00088</a> uint32_t <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#93433bc21fa8fc6b7f65251a5cf33eb1" title="Address of status-array in SPU&amp;#39;s local-storage.">status_base_in_ls</a>; <span class="comment">/**&lt; Address of status-array in SPU's local-storage */</span>
<a name="l00089"></a>00089 } <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html" title="SPU-Thread structure.">moc_spu_thread_t</a>; <span class="comment">/**&lt; typedef of \ref moc_spu_thread_struct */</span>
<a name="l00090"></a>00090
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="comment"></span>
<a name="l00093"></a>00093 <span class="comment">/**</span>
<a name="l00094"></a>00094 <span class="comment"> * actual number of SPU-Threads.</span>
<a name="l00095"></a>00095 <span class="comment"> * </span>
<a name="l00096"></a>00096 <span class="comment"> * \note PPU only</span>
<a name="l00097"></a>00097 <span class="comment"> **/</span>
<a name="l00098"></a><a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961">00098</a> uint8_t <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>;
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="comment"></span>
<a name="l00101"></a>00101 <span class="comment">/**</span>
<a name="l00102"></a>00102 <span class="comment"> * actual number of PPU-Threads.</span>
<a name="l00103"></a>00103 <span class="comment"> * </span>
<a name="l00104"></a>00104 <span class="comment"> * \note PPU only</span>
<a name="l00105"></a>00105 <span class="comment"> **/</span>
<a name="l00106"></a><a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52">00106</a> uint8_t <a class="code" href="../../dc/df1/group__internal__spu__thread.html#gf4270da4dbf663fde50a876067ed0d52" title="actual number of PPU-Threads.">moc_ppu_thread_count</a>;
<a name="l00107"></a>00107 <span class="comment"></span>
<a name="l00108"></a>00108 <span class="comment">/**</span>
<a name="l00109"></a>00109 <span class="comment"> * init buffer size</span>
<a name="l00110"></a>00110 <span class="comment"> **/</span>
<a name="l00111"></a><a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106">00111</a> uint32_t <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g8ad19e80234fb6b4d73684e47e007106" title="init buffer size">moc_spu_buffer_size</a>;
<a name="l00112"></a>00112 <span class="comment"></span>
<a name="l00113"></a>00113 <span class="comment">/**</span>
<a name="l00114"></a>00114 <span class="comment"> * init message-queue size</span>
<a name="l00115"></a>00115 <span class="comment"> **/</span>
<a name="l00116"></a><a class="code" href="../../dc/df1/group__internal__spu__thread.html#g2af87be0fa5a8b93ac563c819047328a">00116</a> uint8_t <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g2af87be0fa5a8b93ac563c819047328a" title="init message-queue size">moc_spu_queue_size</a>;
<a name="l00117"></a>00117 <span class="comment"></span>
<a name="l00118"></a>00118 <span class="comment">/**</span>
<a name="l00119"></a>00119 <span class="comment"> * array of SPU-Threads.</span>
<a name="l00120"></a>00120 <span class="comment"> * </span>
<a name="l00121"></a>00121 <span class="comment"> * \note PPU only</span>
<a name="l00122"></a>00122 <span class="comment"> **/</span>
<a name="l00123"></a><a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e">00123</a> <a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html" title="SPU-Thread structure.">moc_spu_thread_t</a> <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../db/dae/ppu_2moc_8h.html#a6aacc64a745d563ed72610e08ceb3ef" title="Maximum number of possible SPU-threads.">MOC_SPU_THREAD_MAX</a>];
<a name="l00124"></a>00124 <span class="comment"></span>
<a name="l00125"></a>00125 <span class="comment">/**</span>
<a name="l00126"></a>00126 <span class="comment"> * PThread-function for creating SPU-Threads</span>
<a name="l00127"></a>00127 <span class="comment"> **/</span>
<a name="l00128"></a>00128 <span class="keywordtype">void</span>* <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g669046500ec44affc79468b12ddaaf92" title="PThread-function for creating SPU-Threads.">moc_spe_pthread_func</a>(<span class="keywordtype">void</span> *arg);
<a name="l00129"></a>00129
<a name="l00130"></a>00130 <span class="comment"></span>
<a name="l00131"></a>00131 <span class="comment">//@}</span>
<a name="l00132"></a>00132 <span class="comment"></span><span class="preprocessor">#endif </span><span class="comment">/*MOC_INTERNAL_CORE_PPU_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>