Someone correct me if i'm wrong: i would say a[i][j][k] is correct. if you think about how data is stored in a 3D array, you essentially have an array, of arrays, of arrays. For spatial locality, we wish to access the same array when iterating. a[i] : will give us a 2D array a[i][j] will give us a 1D array a[i][j][k] will give us the k'th item of the a[i][j] array. This will mean that for each i and j, the array a[i][j] is stored and cache, and all elements of the array may be accessed sequentially, while utilizing spatial locality. Don't get fooled by the fancy wordsabove, i refreshed this 30 mins ago, and still doubt my self as i have an exam with it in a few hours :) I think? 👀
Thank you so much sir. You do a much better job than Professor Mark at Michigan State University.
Nice explanation and out of the slides material, nice.
Very straight forward and easy to understand explanation, thank you.
he is a boss
Maybe I heard wrong, but I heard the professor say sum += a[j] [i] [k] -- to increase spatial locality. I would change it to sum += a[i] [j] [k]
coool ... its a clean and easy explanation... thanks a lot brother..
so how to fix? fixed= a[i][j][k]; correct?
Someone correct me if i'm wrong:
i would say a[i][j][k] is correct. if you think about how data is stored in a 3D array, you essentially have an array, of arrays, of arrays.
For spatial locality, we wish to access the same array when iterating.
a[i] : will give us a 2D array
a[i][j] will give us a 1D array
a[i][j][k] will give us the k'th item of the a[i][j] array.
This will mean that for each i and j, the array a[i][j] is stored and cache, and all elements of the array may be accessed sequentially, while utilizing spatial locality.
Don't get fooled by the fancy wordsabove, i refreshed this 30 mins ago, and still doubt my self as i have an exam with it in a few hours :)
I think? 👀
Thank you for the video! Amazing
Thank you, sir!
can someone please explain how the 3 dimensional array program is fixed ?
think about how to access each array, and array of arrays sequentially
You save me, thank you very much.
Thank you so much! This is of such great help!
You are a genius
Thank you so much!
THANK U SIR........
many thanks. :D
life saver!
Bolo To mast Samjhaya bidu
Thanks
n?