Home | History | Annotate | Download | only in renderscript
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      5 
      6 <title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh File Reference</title>
      7 <link href="tabs.css" rel="stylesheet" type="text/css"/>
      8 <link href="doxygen.css" rel="stylesheet" type="text/css" />
      9 
     10 
     11 
     12 </head>
     13 <body>
     14 <div id="top"><!-- do not remove this div! -->
     15 
     16 
     17 <!-- Generated by Doxygen 1.7.5.1 -->
     18   <div id="navrow1" class="tabs">
     19     <ul class="tablist">
     20       <li><a href="index.html"><span>Overview</span></a></li>
     21       <li class="current"><a href="globals.html"><span>Globals</span></a></li>
     22       <li><a href="annotated.html"><span>Structs</span></a></li>
     23     </ul>
     24   </div>
     25 </div>
     26 <div class="header">
     27   <div class="summary">
     28 <a href="#func-members">Functions</a>  </div>
     29   <div class="headertitle">
     30 <div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh File Reference</div>  </div>
     31 </div>
     32 <div class="contents">
     33 <table class="memberdecls">
     34 <tr><td colspan="2"><h2><a name="func-members"></a>
     35 Functions</h2></td></tr>
     36 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a2ecab064ea2b720bc3af27b523388f31">rsElementGetSubElementCount</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
     37 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a8c690bce7d32be759fd787740c270c92">rsElementGetSubElement</a> (<a class="el" href="structrs__element.html">rs_element</a>, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
     38 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a94834eb1d91b50a5df3cbe161c22e37d">rsElementGetSubElementNameLength</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
     39 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a3c1446166c43aa6ba3d5359f6c982f02">rsElementGetSubElementName</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index, char *name, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> nameLength)</td></tr>
     40 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a9c3140c18139db451279d9b221808eee">rsElementGetSubElementArraySize</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
     41 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a840d53f1e91bb6887b40a4d8983c53ed">rsElementGetSubElementOffsetBytes</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
     42 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#ac54592168af5896d3fba5283af286f98">rsElementGetBytesSize</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
     43 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a9a3569d242be363517ea2354d98cf382">rsElementGetDataType</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
     44 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#af072702a530e158093d69353072da5f9">rsElementGetDataKind</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
     45 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a727997de25ae43c07dffcfd484928d53">rsElementGetVectorSize</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
     46 </table>
     47 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
     48 <div class="textblock"><p>Element routines. </p>
     49 
     50 <p>Definition in file <a class="el" href="rs__element_8rsh_source.html">rs_element.rsh</a>.</p>
     51 </div><hr/><h2>Function Documentation</h2>
     52 <a class="anchor" id="ac54592168af5896d3fba5283af286f98"></a><!-- doxytag: member="rs_element.rsh::rsElementGetBytesSize" ref="ac54592168af5896d3fba5283af286f98" args="(rs_element e)" -->
     53 <div class="memitem">
     54 <div class="memproto">
     55       <table class="memname">
     56         <tr>
     57           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetBytesSize </td>
     58           <td>(</td>
     59           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
     60           <td class="paramname"><em>e</em></td><td>)</td>
     61           <td></td>
     62         </tr>
     63       </table>
     64 </div>
     65 <div class="memdoc">
     66 <p>Returns the size of element in bytes</p>
     67 <dl><dt><b>Parameters:</b></dt><dd>
     68   <table class="params">
     69     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
     70   </table>
     71   </dd>
     72 </dl>
     73 <dl class="return"><dt><b>Returns:</b></dt><dd>total size of the element in bytes </dd></dl>
     74 
     75 </div>
     76 </div>
     77 <a class="anchor" id="af072702a530e158093d69353072da5f9"></a><!-- doxytag: member="rs_element.rsh::rsElementGetDataKind" ref="af072702a530e158093d69353072da5f9" args="(rs_element e)" -->
     78 <div class="memitem">
     79 <div class="memproto">
     80       <table class="memname">
     81         <tr>
     82           <td class="memname"><a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a> rsElementGetDataKind </td>
     83           <td>(</td>
     84           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
     85           <td class="paramname"><em>e</em></td><td>)</td>
     86           <td></td>
     87         </tr>
     88       </table>
     89 </div>
     90 <div class="memdoc">
     91 <p>Returns the element's data kind</p>
     92 <dl><dt><b>Parameters:</b></dt><dd>
     93   <table class="params">
     94     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
     95   </table>
     96   </dd>
     97 </dl>
     98 <dl class="return"><dt><b>Returns:</b></dt><dd>element's data size </dd></dl>
     99 
    100 </div>
    101 </div>
    102 <a class="anchor" id="a9a3569d242be363517ea2354d98cf382"></a><!-- doxytag: member="rs_element.rsh::rsElementGetDataType" ref="a9a3569d242be363517ea2354d98cf382" args="(rs_element e)" -->
    103 <div class="memitem">
    104 <div class="memproto">
    105       <table class="memname">
    106         <tr>
    107           <td class="memname"><a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a> rsElementGetDataType </td>
    108           <td>(</td>
    109           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    110           <td class="paramname"><em>e</em></td><td>)</td>
    111           <td></td>
    112         </tr>
    113       </table>
    114 </div>
    115 <div class="memdoc">
    116 <p>Returns the element's data type</p>
    117 <dl><dt><b>Parameters:</b></dt><dd>
    118   <table class="params">
    119     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    120   </table>
    121   </dd>
    122 </dl>
    123 <dl class="return"><dt><b>Returns:</b></dt><dd>element's data type </dd></dl>
    124 
    125 </div>
    126 </div>
    127 <a class="anchor" id="a8c690bce7d32be759fd787740c270c92"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElement" ref="a8c690bce7d32be759fd787740c270c92" args="(rs_element, uint32_t index)" -->
    128 <div class="memitem">
    129 <div class="memproto">
    130       <table class="memname">
    131         <tr>
    132           <td class="memname"><a class="el" href="structrs__element.html">rs_element</a> rsElementGetSubElement </td>
    133           <td>(</td>
    134           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    135           <td class="paramname">, </td>
    136         </tr>
    137         <tr>
    138           <td class="paramkey"></td>
    139           <td></td>
    140           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    141           <td class="paramname"><em>index</em>&#160;</td>
    142         </tr>
    143         <tr>
    144           <td></td>
    145           <td>)</td>
    146           <td></td><td></td>
    147         </tr>
    148       </table>
    149 </div>
    150 <div class="memdoc">
    151 <p>For complex elements, this function will return the sub-element at index</p>
    152 <dl><dt><b>Parameters:</b></dt><dd>
    153   <table class="params">
    154     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    155     <tr><td class="paramname">index</td><td>index of the sub-element to return </td></tr>
    156   </table>
    157   </dd>
    158 </dl>
    159 <dl class="return"><dt><b>Returns:</b></dt><dd>sub-element in this element at given index </dd></dl>
    160 
    161 </div>
    162 </div>
    163 <a class="anchor" id="a9c3140c18139db451279d9b221808eee"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementArraySize" ref="a9c3140c18139db451279d9b221808eee" args="(rs_element e, uint32_t index)" -->
    164 <div class="memitem">
    165 <div class="memproto">
    166       <table class="memname">
    167         <tr>
    168           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementArraySize </td>
    169           <td>(</td>
    170           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    171           <td class="paramname"><em>e</em>, </td>
    172         </tr>
    173         <tr>
    174           <td class="paramkey"></td>
    175           <td></td>
    176           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    177           <td class="paramname"><em>index</em>&#160;</td>
    178         </tr>
    179         <tr>
    180           <td></td>
    181           <td>)</td>
    182           <td></td><td></td>
    183         </tr>
    184       </table>
    185 </div>
    186 <div class="memdoc">
    187 <p>For complex elements, some sub-elements could be statically sized arrays. This function will return the array size for sub-element at index</p>
    188 <dl><dt><b>Parameters:</b></dt><dd>
    189   <table class="params">
    190     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    191     <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
    192   </table>
    193   </dd>
    194 </dl>
    195 <dl class="return"><dt><b>Returns:</b></dt><dd>array size of sub-element in this element at given index </dd></dl>
    196 
    197 </div>
    198 </div>
    199 <a class="anchor" id="a2ecab064ea2b720bc3af27b523388f31"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementCount" ref="a2ecab064ea2b720bc3af27b523388f31" args="(rs_element e)" -->
    200 <div class="memitem">
    201 <div class="memproto">
    202       <table class="memname">
    203         <tr>
    204           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementCount </td>
    205           <td>(</td>
    206           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    207           <td class="paramname"><em>e</em></td><td>)</td>
    208           <td></td>
    209         </tr>
    210       </table>
    211 </div>
    212 <div class="memdoc">
    213 <p>Elements could be simple, such as an int or a float, or a structure with multiple sub elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.</p>
    214 <dl><dt><b>Parameters:</b></dt><dd>
    215   <table class="params">
    216     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    217   </table>
    218   </dd>
    219 </dl>
    220 <dl class="return"><dt><b>Returns:</b></dt><dd>number of sub-elements in this element </dd></dl>
    221 
    222 </div>
    223 </div>
    224 <a class="anchor" id="a3c1446166c43aa6ba3d5359f6c982f02"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementName" ref="a3c1446166c43aa6ba3d5359f6c982f02" args="(rs_element e, uint32_t index, char *name, uint32_t nameLength)" -->
    225 <div class="memitem">
    226 <div class="memproto">
    227       <table class="memname">
    228         <tr>
    229           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementName </td>
    230           <td>(</td>
    231           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    232           <td class="paramname"><em>e</em>, </td>
    233         </tr>
    234         <tr>
    235           <td class="paramkey"></td>
    236           <td></td>
    237           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    238           <td class="paramname"><em>index</em>, </td>
    239         </tr>
    240         <tr>
    241           <td class="paramkey"></td>
    242           <td></td>
    243           <td class="paramtype">char *&#160;</td>
    244           <td class="paramname"><em>name</em>, </td>
    245         </tr>
    246         <tr>
    247           <td class="paramkey"></td>
    248           <td></td>
    249           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    250           <td class="paramname"><em>nameLength</em>&#160;</td>
    251         </tr>
    252         <tr>
    253           <td></td>
    254           <td>)</td>
    255           <td></td><td></td>
    256         </tr>
    257       </table>
    258 </div>
    259 <div class="memdoc">
    260 <p>For complex elements, this function will return the sub-element name at index</p>
    261 <dl><dt><b>Parameters:</b></dt><dd>
    262   <table class="params">
    263     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    264     <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
    265     <tr><td class="paramname">name</td><td>array to store the name into </td></tr>
    266     <tr><td class="paramname">nameLength</td><td>length of the provided name array </td></tr>
    267   </table>
    268   </dd>
    269 </dl>
    270 <dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually written, excluding the null terminator </dd></dl>
    271 
    272 </div>
    273 </div>
    274 <a class="anchor" id="a94834eb1d91b50a5df3cbe161c22e37d"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementNameLength" ref="a94834eb1d91b50a5df3cbe161c22e37d" args="(rs_element e, uint32_t index)" -->
    275 <div class="memitem">
    276 <div class="memproto">
    277       <table class="memname">
    278         <tr>
    279           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementNameLength </td>
    280           <td>(</td>
    281           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    282           <td class="paramname"><em>e</em>, </td>
    283         </tr>
    284         <tr>
    285           <td class="paramkey"></td>
    286           <td></td>
    287           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    288           <td class="paramname"><em>index</em>&#160;</td>
    289         </tr>
    290         <tr>
    291           <td></td>
    292           <td>)</td>
    293           <td></td><td></td>
    294         </tr>
    295       </table>
    296 </div>
    297 <div class="memdoc">
    298 <p>For complex elements, this function will return the length of sub-element name at index</p>
    299 <dl><dt><b>Parameters:</b></dt><dd>
    300   <table class="params">
    301     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    302     <tr><td class="paramname">index</td><td>index of the sub-element to return </td></tr>
    303   </table>
    304   </dd>
    305 </dl>
    306 <dl class="return"><dt><b>Returns:</b></dt><dd>length of the sub-element name including the null terminator (size of buffer needed to write the name) </dd></dl>
    307 
    308 </div>
    309 </div>
    310 <a class="anchor" id="a840d53f1e91bb6887b40a4d8983c53ed"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementOffsetBytes" ref="a840d53f1e91bb6887b40a4d8983c53ed" args="(rs_element e, uint32_t index)" -->
    311 <div class="memitem">
    312 <div class="memproto">
    313       <table class="memname">
    314         <tr>
    315           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementOffsetBytes </td>
    316           <td>(</td>
    317           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    318           <td class="paramname"><em>e</em>, </td>
    319         </tr>
    320         <tr>
    321           <td class="paramkey"></td>
    322           <td></td>
    323           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
    324           <td class="paramname"><em>index</em>&#160;</td>
    325         </tr>
    326         <tr>
    327           <td></td>
    328           <td>)</td>
    329           <td></td><td></td>
    330         </tr>
    331       </table>
    332 </div>
    333 <div class="memdoc">
    334 <p>This function specifies the location of a sub-element within the element</p>
    335 <dl><dt><b>Parameters:</b></dt><dd>
    336   <table class="params">
    337     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    338     <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
    339   </table>
    340   </dd>
    341 </dl>
    342 <dl class="return"><dt><b>Returns:</b></dt><dd>offset in bytes of sub-element in this element at given index </dd></dl>
    343 
    344 </div>
    345 </div>
    346 <a class="anchor" id="a727997de25ae43c07dffcfd484928d53"></a><!-- doxytag: member="rs_element.rsh::rsElementGetVectorSize" ref="a727997de25ae43c07dffcfd484928d53" args="(rs_element e)" -->
    347 <div class="memitem">
    348 <div class="memproto">
    349       <table class="memname">
    350         <tr>
    351           <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetVectorSize </td>
    352           <td>(</td>
    353           <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
    354           <td class="paramname"><em>e</em></td><td>)</td>
    355           <td></td>
    356         </tr>
    357       </table>
    358 </div>
    359 <div class="memdoc">
    360 <p>Returns the element's vector size</p>
    361 <dl><dt><b>Parameters:</b></dt><dd>
    362   <table class="params">
    363     <tr><td class="paramname">e</td><td>element to get data from </td></tr>
    364   </table>
    365   </dd>
    366 </dl>
    367 <dl class="return"><dt><b>Returns:</b></dt><dd>length of the element vector (for float2, float3, etc.) </dd></dl>
    368 
    369 </div>
    370 </div>
    371 </div>
    372 
    373 </body>
    374 </html>
    375