Renderscript limitation size of array

淺唱寂寞╮ 提交于 2019-12-08 01:34:33

问题


I'm doing matrix multiplication in Renderscript. I have my java file which prepares all the arrays. In my Renderscript I have global variables which will be set by the java file. But I have seen there is a limitation. If I want to do a multiplication with 37x37 matrix the results still right. If I do a 38x38 matrix multplication the results are no longer correct. After the first row of the final result the calculation results are not correct. I guess there is a limitation. 37*37 = 1369

int vectorcol[1369];
int matrixA[1369];
int matrixB[1369];

I did now a dynamic Array Allocation in Java and RenderScript. That works fine, but it is still the same problem. Till a matrixsize of 37 it works fine. Starting with a matrixsize of 38 it won't return correct results. I don't know where the problem is.

How can I do this in Renderscript?

[1] http://docs.eoeandroid.com/guide/topics/renderscript/advanced.html#mem-allocation

来源:https://stackoverflow.com/questions/16103730/renderscript-limitation-size-of-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!