Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
RenderScript: parallel computing on Android, the easy way
Special thanks
Table of contents
Introduction
Who this book is for
What is parallel computing?
CPU side
GPU side
Result
What is needed to use this book
Author thoughts
How this book is structured
Source code
What is RenderScript
Experience-based API Note
How RenderScript works
First example
Setup RenderScript
Create an RS Script
Conclusions
RenderScript components
The language
Element
Predefined elements
Custom struct elements
Custom Java elements
Type
Allocation
Context
Debug note
Script
#pragma rs_fp_relaxed
Script components
FilterScript
Message queue
RenderScript support library
USAGE_IO flags
Book note
Conclusions
Performance notes
Memory architecture
Example: convolution
GPU or CPU?
Profiler sample project
Profiler: memory access
Profiler: pure calculation
Profiler: kernels calling
Test specifics
Crowdsourced testing
Memory access
Pure calculation
RGBA to grayscale
Kernels calling
Conclusions
Native analysis
RenderScript call workflow
static void nAllocationCopyToBitmap(...)
rsAllocationCopyToBitmap(...)
void rsi_AllocationCopyToBitmap(...)
void Allocation::read(...)
void (*data2D)(...)
void rsdAllocationData2D(...)
Bonus function: static void Update2DTexture(...)
RenderScript driver
Note: Java pointers
RenderScript and 64-bit
RenderScript compile and runtime
slang - Compiler for RenderScript language
libbcc - Executor of RenderScript bitcode resources
Diagram
Conclusions
RenderScript and NDK
Access RenderScript elements using Java reflection
Allocation pointer access
Native kernel calling
RenderScript NDK native support
Setup
C++ code
Notes
Conclusions
Use cases
Debug
Random numbers
Blur
YUV to RGBA conversion
RGBA to grayscale conversion
Surface rendering
Usage
Workflow
Camera capture
Workflow
Profiling code
Resizing images
Custom implementation
Color normalization
Custom struct element copy to Java
Padding
Offset
Reading elements
Dynamic bitcode loading
Workflow
Module - rsscriptparser
Module - rslibrary
Module - app
Porting case - FAST features detection
FAST features
Detection process
The porting process
Input
Porting - Original FAST library
Porting - OpenCV implementation
Porting - conclusions
The comparison
Input
CPU version
GPU version
Results
Further works - Scoring
Conclusions
Conclusions
The framework
The book
What is missing?
Appendix - API changes
API 19
API 20
API 21
API 22
API 23
Appendix: Enable NDK support
Install NDK
Simple implementation
External ndk-build implementation
Appendix: Other Android parallel computing frameworks
OpenGL ES
OpenCL
Vulkan
CUDA (Only for Tegra-powered devices)
← Prev
Back
Next →
← Prev
Back
Next →