Book Image

Android NDK: Beginner's Guide

By : Sylvain Ratabouil
Book Image

Android NDK: Beginner's Guide

By: Sylvain Ratabouil

Overview of this book

Table of Contents (18 chapters)
Android NDK Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 10. Intensive Computing with RenderScript

If the NDK is one of the best tools to get a high performance on Android. It gives low-level access to the machine, gives you control on memory allocation, provides access to advanced CPU instruction-sets, and even more.

This power comes with a price: to get maximum performance on a key piece of code, ones need to optimize code for the many devices and platforms in the world. Sometimes, it is more appropriate to use CPU SIMD instructions, and other times, to perform computation on the GPU. You had better be experienced and have plenty of devices and time in front of you! This is the reason Google introduced RenderScript on Android.

RenderScript is a programming language specific to Android written with one goal in mind: performance. Let's be clear, applications cannot be entirely written in RenderScript. However, the critical parts, requiring intensive computations, should be! RenderScript can be executed from either Java or C/C++.

In this...