RenderScript is a component of the
Android operating system
Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Android is developed by a consortium of deve ...
for mobile devices that offers an
API for acceleration that takes advantage of
heterogeneous
Homogeneity and heterogeneity are concepts often used in the sciences and statistics relating to the uniformity of a substance or organism. A material or image that is homogeneous is uniform in composition or character (i.e. color, shape, siz ...
hardware. It allows developers to increase the performance of their applications at the cost of writing more complex (lower-level) code.
It provides the developer three primary tools: A simple 3D rendering API, a compute API similar to
CUDA, and a
C99-derived language.
History
RenderScript was added in
Android 3.0 Honeycomb
Android Honeycomb is the codename for the third version of Android, designed for devices with larger screen sizes, particularly tablets, however has been unofficially ported to the Nexus One. It is the third major release of Android and is no ...
.
As of Android 4.1, RenderScript's experimental
3D rendering API has been deprecated, and now exists solely as a compute API.
Android 4.2 added new capabilities to script intrinsics, such as ''Blend'' and ''Blur''; as well as ''ScriptGroups'' which allows related RenderScript scripts to be grouped and executed with one call.
It also added ''FilterScript,'' which is a subset of RenderScript that allows developers to write their image processing operations in FilterScript using the standard RenderScript runtime API, but within stricter constraints that ensure wider compatibility and improved optimization across
multi-core
A multi-core processor is a microprocessor on a single integrated circuit with two or more separate processing units, called cores, each of which reads and executes program instructions. The instructions are ordinary CPU instructions (such a ...
CPUs,
GPUs, and
DSPs. FilterScript is less precise in
floating point precision, and more cross device compatible subset of RenderScript – and should not be mistaken for a RenderScript replacement technology.
On April 19, 2021, Google announced that RenderScript will be
deprecated in
Android 12, and recommended porting existing code to
Vulkan.
Features
Portability
RenderScript is designed to always run on the various Android platforms regardless of hardware type. Performance tuning is done at runtime.
RenderScript portability depends upon device-specific drivers:
a basic CPU-only driver is provided for every device, while there exist some specific chipset-provided RenderScript drivers that enable GPU usage (e.g. Qualcomm specific drivers, which are provided in the
libRSDriver_adreno.so
Android library).
Performance
RenderScript is designed to tune tasks at runtime that can be efficiently split and run concurrently on the underlying hardware.
As of Android 4.2, RenderScript has been expanded to run on the GPU in addition to the CPU on supported systems.
Limitations
* RenderScript cannot yet express on-chip inter-thread communication (known as local memory in
OpenCL, and shared memory in CUDA).
* RenderScript cannot yet express hardware-implemented 2D and 3D lookups with bilinear interpolation (known as texture in CUDA, and image read in OpenCL).
References
External links
Google Developer pageGoogle details low-level Renderscript API for Honeycomb
*
ttp://www.independent-software.com/setting-up-android-renderscript-in-android-studio-1-3/ Guide to setting up Renderscript in Android Studio
{{Android
Android (operating system)
GPGPU libraries