Reputation: 1820
Is there a possibility to use two dimensional arrays in RenderScript for Android? Allocation only allows me to put a vector (1 dimensional) array into the allocation. But I have no idea how to generate two dimensional arrays. I found a google groups discussion on this topic, but this guy didn't received any answer. If I want to create a two dimensional array in the rs File, I get an error:
int array[10][10];
The following error will be displayed:
error: multidimensional arrays cannot be exported: 'array'
As I have seen in the renderscript files is that the arrays 2x2, 3x3 and 4x4 are based on one dimensional arrays. For me this is very restrictive to use. Because for math stuff there should be a support for calculation of big matrices too.
Upvotes: 2
Views: 983
Reputation: 1469
Mark is static. The issue is there is no clean way to export this to the Java reflected files. There should be no issues with non-exported arrays.
RS does additional checked on globals which are not marked static. As a general rule, if you are not setting them from the other side, make them static.
Upvotes: 2