page.title=Compute parent.title=RenderScript parent.link=index.html @jd:body
RenderScript exposes a set of compute APIs that you can use to do intensive computational operations.
You can use the compute APIs in the context of a graphics RenderScript such as calculating the
transformation of many geometric objects in a scene. You can also create a standalone compute RenderScript that does not
draw anything to the screen such as bitmap image processing for a photo editor application.
The RenderScript compute APIs are mainly defined in the rs_cl.rsh
header
Compute RenderScripts are simpler to setup and implement as there is no graphics rendering involved.
You can offload computational aspects of your application to RenderScript by creating a native RenderScript
file (.rs) and using the generated reflected layer class to call functions in the .rs
file.
See the HelloCompute sample in the Android SDK for more information on how to create a simple compute RenderScript.
See the Balls sample in the Android SDK for more information on how to create a compute RenderScript that is used in a graphics RenderScript. The compute RenderScript is contained in balls_physics.rs.