56 lines
5.7 KiB
HTML
Executable File
56 lines
5.7 KiB
HTML
Executable File
<!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-iget_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/dma/moc_dma-iget_ppu.c</h1><a href="../../d3/dc6/moc__dma-iget__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 <string.h></span>
|
|
<a name="l00003"></a>00003
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#include <<a class="code" href="../../d0/d3a/spu_2moc_8h.html">moc.h</a>></span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#include <<a class="code" href="../../db/d62/moc__dma__ppu_8h.html">ppu/moc_dma_ppu.h</a>></span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor">#include <<a class="code" href="../../d9/db3/imoc_8h.html">internal/imoc.h</a>></span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor">#include <<a class="code" href="../../d8/d98/imoc__macros__ppu_8h.html">internal/ppu/imoc_macros_ppu.h</a>></span>
|
|
<a name="l00008"></a>00008 <span class="preprocessor">#include <<a class="code" href="../../de/df9/imoc__dma__ppu_8h.html">internal/ppu/imoc_dma_ppu.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="../../d9/d16/group__dma__access.html#g08f0af30f2e0e6840ec2be5ca93fd14f">00011</a> <span class="keywordtype">int</span> <a class="code" href="../../d9/d16/group__dma__access.html#g08f0af30f2e0e6840ec2be5ca93fd14f" title="Wrapper-function for a non-blocking DMA-get operation.">MOC_IGet_data</a>(<span class="keywordtype">void</span>* target, uint32_t source, <span class="keywordtype">int</span> count,
|
|
<a name="l00012"></a>00012 <a class="code" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a" title="Typedef defining MOC_Datatype.">MOC_Datatype</a> datatype, <span class="keywordtype">int</span> dest, <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 & 0xF0) >> 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 & 0xF0) >> 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> ((((uint64_t) target) % 16) != 0 || (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&#39;t 16-byte aligned.">MOC_ERR_BAD_ALIGNMENT</a>;
|
|
<a name="l00025"></a>00025 <a class="code" href="../../d3/d32/group__internal__tm.html#g8026463e106a01cc8efb816d7dc1036a" title="Tests if invalid byte-count in a recv-operation.">IMOC_TEST_BYTECOUNT</a>(bytecount)
|
|
<a name="l00026"></a>00026 <a class="code" href="../../d3/d32/group__internal__tm.html#g1dfddaa8f7d9aad32b00248c7dc782d2" title="Tests if invalid rank.">IMOC_TEST_RANK</a>(dest)
|
|
<a name="l00027"></a>00027
|
|
<a name="l00028"></a>00028 request-><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="l00029"></a>00029
|
|
<a name="l00030"></a>00030 <span class="keywordflow">return</span> <a class="code" href="../../d2/de2/group__internal__p2p__dma.html#g0c76eeaa08ac299e19dc2758d4142cd9" title="Internal wrapper-function for a non-blocking DMA-get operation.">IMOC_iget_data</a>(target, source, bytecount, dest,
|
|
<a name="l00031"></a>00031 &request-><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="l00032"></a>00032 }
|
|
<a name="l00033"></a>00033
|
|
</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>
|