notyou

2D arrays possible?

Discussion created by notyou on Mar 23, 2010
Latest reply on Mar 24, 2010 by notyou

Hello everyone,

I've been browsing the web for an answer to this for a while and I wasn't able to find an exact answer. In something like matrix multiplication, can we do something like:

for(a=0 -> X)

for(j = 0 -> Y)

Matrix[a][j] = ...

or do we need to flatten the array into a 1D array and then use our global/local address + an offset to get the actual element to work on?

If we can't do a 2D array, can we access data structures, such as a struct containing all relevant matrix information?

Thanks for the help.

Outcomes