compute.jd revision 19aad293c0dba4ed9a47939c487fecdd5318ef08
1page.title=Compute
2parent.title=RenderScript
3parent.link=index.html
4@jd:body
5
6  <div id="qv-wrapper">
7    <div id="qv">
8
9      <h2>Related Samples</h2>
10
11      <ol>
12        <li><a href="{@docRoot}resources/samples/RenderScript/HelloCompute/index.html">Hello
13        Compute</a></li>
14        <li><a href="{@docRoot}resources/samples/RenderScript/Balls/index.html">Balls</a></li>
15      </ol>
16    </div>
17  </div>
18
19  <p>RenderScript exposes a set of compute APIs that you can use to do intensive computational operations.
20  You can use the compute APIs in the context of a graphics RenderScript such as calculating the
21  transformation of many geometric objects in a scene. You can also create a standalone compute RenderScript that does not
22  draw anything to the screen such as bitmap image processing for a photo editor application.
23  The RenderScript compute APIs are mainly defined in the <code>rs_cl.rsh</code> header</p>
24  
25  <p>Compute RenderScripts are simpler to setup and implement as there is no graphics rendering involved.
26  You can offload computational aspects of your application to RenderScript by creating a native RenderScript
27  file (.rs) and using the generated reflected layer class to call functions in the <code>.rs</code> file. 
28
29  <p>See the <a href="{@docRoot}resources/samples/RenderScript/HelloCompute/index.html">HelloCompute</a>
30  sample in the Android SDK for more
31  information on how to create a simple compute RenderScript.</p>
32  <p>  
33  See the <a href="{@docRoot}resources/samples/RenderScript/Balls/index.html">Balls</a>
34  sample in the Android SDK for more
35  information on how to create a compute RenderScript that is used in a graphics RenderScript.
36  The compute RenderScript is contained in 
37  <a href="{@docRoot}resources/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.html">balls_physics.rs</a>.
38  </p>