If you declare a kernel and pass a 2D array as an argument then try to reference elements from that argument, it would be expected that the referenced variable would be an array, however it seems that the argument for some reason is being passed as a 1D array insead with the content of this array being a concatenation of all the elements of the 2d array.
However what seems to be happening is that the 'Array of Arrays' is getting transformed into a single array containing all the elements of all the child arrays instead which is strange to me :/ Maybe i'm not doing something properly I don't know.
How important is this (1-5)?
To me it's a 5
Expected behavior (i.e. solution)
I would expect that the structure of the argument passed to the kernel remains the same, i.e. a 2D array is passed and a 2D array is loaded into the kernel.
What is wrong?
If you declare a kernel and pass a 2D array as an argument then try to reference elements from that argument, it would be expected that the referenced variable would be an array, however it seems that the argument for some reason is being passed as a 1D array insead with the content of this array being a concatenation of all the elements of the 2d array.
As an example:
In the documentation is says that it is possible to pass an 'Array of Arrays' https://github.com/gpujs/gpu.js#accepting-input
However what seems to be happening is that the 'Array of Arrays' is getting transformed into a single array containing all the elements of all the child arrays instead which is strange to me :/ Maybe i'm not doing something properly I don't know.
How important is this (1-5)?
To me it's a 5
Expected behavior (i.e. solution)
I would expect that the structure of the argument passed to the kernel remains the same, i.e. a 2D array is passed and a 2D array is loaded into the kernel.