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

mysql - How to enter php data into a html multiple select box -

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

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -