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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

asp.net mvc - How to attach sql database to a javascript graph -

c# - How to know the number of Threads created and limit the Tasks accordingly -