C - Transposing a multidimensional array using pointer arithmetic -
I am trying to swap two dimensions using two-dimension (MxM) array using pointer arithmetic, but It does not seem to include the pointer magic to understand.
Here's what I've got so far:
typedef int marray_t [m] [m]; Zero shift (Marray_t A) {int i, j; Int * startAddress = & amp; A [0] [0]; For (i = 0; i Here's a slower version, trying to optimize:
zero transfers (Marray_t A) {int i, j; For (i = 0; i
you should rewrite the loops
Comments
Post a Comment