I need to process elements in large array and due to performance issues i need to do this in GPU of android device. please give a idea to implement this.
Asked
Active
Viewed 2,207 times
-4
-
Since you tagged this question `renderscript`, when you read [the documentation on RenderScript Compute](https://developer.android.com/guide/topics/renderscript/compute.html), what did you learn? What *specific* questions do you have remaining after having read that documentation? – CommonsWare Feb 13 '14 at 21:20
-
Thank you for replying. main problem is how to pass my byte array to render script and get back the processed array i don't have much experience in C , C++ . – droidNDK Feb 13 '14 at 21:23
1 Answers
1
Please take a look at http://developer.android.com/guide/topics/renderscript/compute.html. There are also some other examples and sample projects using RenderScript online. Note that there is no way to reliably access the GPU on Android, because not all Android devices have GPUs capable of doing compute workloads. RS is the preferred method for accelerating parallel work.

Stephen Hines
- 2,612
- 1
- 13
- 12
-
Thank you for replying.I did search about this but i couldn't find array processing help in the net . – droidNDK Feb 13 '14 at 21:28
-
You have to copy your byte array into an Allocation containing Element.I8 (the I8 means 8-bit signed integer type). You can use Allocation.copyFrom/Allocation.copyTo to move the data back and forth. – Stephen Hines Feb 13 '14 at 21:34
-
-