title: Transposing a 32x64 matrix
body: <pre><code>if(N == 64 &amp;&amp; M == 32) {
  
      int i, j, C[M][M], CC[M][M], D[M][M], DD[M][M];
  
      // get left half of the matrix, and transpose
      for (i = 0; i &lt; M; i++) {
          for (j = 0; j &lt; M; j++) {
              C[i][j] = A[i][j];
          }
      }
      squareblocktranspose(M, M, C, CC, 4);
  
      // get right half of the matrix, and transpose
      for (i = 0; i &lt; M; i++) {
          for (j = M; j &lt; N; j++) {
              D[i][j-M] = A[i][j];
          }
      }
      squareblocktranspose(M, M, D, DD, 4);
  
      // put transposed left half of the matrix as top half of new matrix
      for (i=0; i &lt; M; i++) {
          for (j = 0; j &lt; M; j++) {
              B[i][j] = CC[i][j];
          }
      }
  
      // put transposed right half of the matrix as bottom half of the old matrix
      for (i=M; i&lt;N; i++) {
          for (j = 0; j &lt; M; j++) {
              B[i][j] = DD[i-M][j];
          }
      }
  } 
  </code></pre>
  
  <p>squareblocktranspose is a function that transposes any square matrix, and it is confirmed to work. However, when I try to test this function, it does not transpose the matrix successfully. What am I doing wrong here? My work is due in 13 minutes... This is just a last ditch effort at figuring out what is going wrong.</p>