Initial commit.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<area shape="rect" href="$d1/d82/moc_8h.html" title="../../moc.h" alt="" coords="139,80,219,107">
|
||||
<area shape="rect" href="$d5/d94/moc__datatype_8h.html" title="moc_datatype.h" alt="" coords="156,155,271,181">
|
||||
<area shape="rect" href="$df/d5c/moc__error__codes_8h.html" title="moc_error_codes.h" alt="" coords="295,155,425,181">
|
||||
@@ -0,0 +1 @@
|
||||
a4b9cf358029449fc4362e77e22a8dd2
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
+58
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>MPI On Cell (Documentation): src/ppu/system/moc_add_spu_thread_ppu.c Source File</title>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.5.6 -->
|
||||
<div class="navigation" id="top">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="../../main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="../../modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="../../annotated.html"><span>Data Structures</span></a></li>
|
||||
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>src/ppu/system/moc_add_spu_thread_ppu.c</h1><a href="../../dc/dd0/moc__add__spu__thread__ppu_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include <malloc_align.h></span>
|
||||
<a name="l00002"></a>00002 <span class="preprocessor">#include <free_align.h></span>
|
||||
<a name="l00003"></a>00003 <span class="preprocessor">#include <stdlib.h></span>
|
||||
<a name="l00004"></a>00004 <span class="preprocessor">#include <string.h></span>
|
||||
<a name="l00005"></a>00005
|
||||
<a name="l00006"></a>00006 <span class="preprocessor">#include <<a class="code" href="../../db/dae/ppu_2moc_8h.html">moc.h</a>></span>
|
||||
<a name="l00007"></a>00007 <span class="preprocessor">#include <<a class="code" href="../../db/dae/ppu_2moc_8h.html">ppu/moc.h</a>></span>
|
||||
<a name="l00008"></a>00008 <span class="preprocessor">#include <<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>></span>
|
||||
<a name="l00009"></a>00009 <span class="preprocessor">#include <<a class="code" href="../../d6/d09/imoc__core__ppu_8h.html">internal/ppu/imoc_core_ppu.h</a>></span>
|
||||
<a name="l00010"></a>00010
|
||||
<a name="l00011"></a><a class="code" href="../../d8/d9a/group__environment__startup.html#geea5b7c117adae78e954f0959fe0c447">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d8/d9a/group__environment__startup.html#geea5b7c117adae78e954f0959fe0c447" title="Adds a SPU-Thread.">MOC_Add_spu_thread</a>(spe_program_handle_t* phandle, <span class="keywordtype">void</span>* argp)
|
||||
<a name="l00012"></a>00012 {
|
||||
<a name="l00013"></a>00013 <span class="keywordflow">if</span> (<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a> >= <a class="code" href="../../db/dae/ppu_2moc_8h.html#a6aacc64a745d563ed72610e08ceb3ef" title="Maximum number of possible SPU-threads.">MOC_SPU_THREAD_MAX</a>)
|
||||
<a name="l00014"></a>00014 {
|
||||
<a name="l00015"></a>00015 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#gb41314dc085e915eab769ff2a2958061" title="Internal Buffer Overflow.">MOC_ERR_BUFFER_OVERFLOW</a>;
|
||||
<a name="l00016"></a>00016 }
|
||||
<a name="l00017"></a>00017 <span class="comment">/* create the SPE context */</span>
|
||||
<a name="l00018"></a>00018 <span class="keywordflow">if</span> ((<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].speid = spe_context_create(
|
||||
<a name="l00019"></a>00019 SPE_MAP_PS, NULL)) == NULL)
|
||||
<a name="l00020"></a>00020 {
|
||||
<a name="l00021"></a>00021 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
|
||||
<a name="l00022"></a>00022 }
|
||||
<a name="l00023"></a>00023 <span class="comment">/* load the SPE program into the SPE context */</span>
|
||||
<a name="l00024"></a>00024 <span class="keywordflow">if</span> (spe_program_load(<a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].speid,
|
||||
<a name="l00025"></a>00025 phandle) != 0)
|
||||
<a name="l00026"></a>00026 {
|
||||
<a name="l00027"></a>00027 <span class="keywordflow">return</span> <a class="code" href="../../d8/da1/group__environment__error.html#g05b3a70831c823a59014c4853a76ca7e" title="Internal MOC (implementation) error.">MOC_ERR_INTERN</a>;
|
||||
<a name="l00028"></a>00028 }
|
||||
<a name="l00029"></a>00029 <span class="comment">/* write thread data into thread-array */</span>
|
||||
<a name="l00030"></a>00030 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#4d3f668b79c172907febb25dbe2813ea" title="Spe-entry-address.">spe_entry_adress</a>
|
||||
<a name="l00031"></a>00031 = SPE_DEFAULT_ENTRY;
|
||||
<a name="l00032"></a>00032 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#ga5b74732b1e31ec1674ea0e5ae465c4e" title="array of SPU-Threads.">moc_spu_thread_list</a>[<a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>].<a class="code" href="../../d1/d8b/structmoc__spu__thread__struct.html#a7f667cf56fc5e3cd906caa8aab765cc" title="effective address of user-defined information in main-memory">argp</a> = argp;
|
||||
<a name="l00033"></a>00033 <a class="code" href="../../dc/df1/group__internal__spu__thread.html#g6cf68c0afe2da7b3a29ecaab8ed45961" title="actual number of SPU-Threads.">moc_spu_thread_count</a>++;
|
||||
<a name="l00034"></a>00034 <span class="keywordflow">return</span> 0;
|
||||
<a name="l00035"></a>00035 }
|
||||
<a name="l00036"></a>00036
|
||||
</pre></div></div>
|
||||
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:49:47 2009 for MPI On Cell (Documentation) by
|
||||
<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>
|
||||
Reference in New Issue
Block a user