java - how to present a 2d array in an 1d array with a size of height or width -


i have problem want parallelization android renderscript. have allocate input data renderscript , allocate them back. want big matrix multiplications size of 8x8 or 64x64 matrices. there 2 problems: 1) cannot allocate 2 dimensional arrays. 2) foreach executes loop size of allocation. e.g. input vector has 10 elements loop executed 10 times. find solution did coding. matrix generated randomly in byte array. byte array coded row or column integer array. put 2d array in 1 dimensional array size of length. on other side (renderscript) have decode them, calculating result , put allocation. want avoid coding , speed application. know better solution problem?

array[a][b] --> vector[a] or vector[b] not vector[a*b] exist there possible solution?

i'm not sure understand problem.

let me try make general suggestion based on understand.

you can create wrapper class transform input index internal index via getters , setters, wrapper can implement java.lang.iterable.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -