I tried to make the source example from [1], because I want to exchange data from Java to Renderscript and vice versa using the data type "integer". Everything in this example is working fine, but I cannot get the data back from RenderScript to Java. I can see the calculated value in the Debug output but using return mScript.get_numberC();
will return 0. I was also trying [2], but that won't work too. So is there any possibility to receive data from RenderScript, without using Allocation? Another question would be how I can pass with Allocations 2 Integer Arrays over to RenderScript and to get one calculated array back without using rsPackColorTo8888(mono)
? Because my application won't be graphics relevant.
[1] How to pass array values to and from Android RenderScript using Allocations
[2] How to exchange data between renderscript and android framework?