What you wrote is equivalent to pointer arithmetic that this would do:
T x[D][H][W];
x[i][j][k]; // Pointer arithmetic done here
It is obvious that, depending on how you order D, Hand W(or i, j, k), the calculation will be different.
source
share