code: public static void block(DMatrix1Row A , DMatrix1Row A_tran ,
                               final int blockLength )
      {
          for( int i = 0; i < A.numRows; i += blockLength ) {
              int blockHeight = Math.min( blockLength , A.numRows - i);
  
              int indexSrc = i*A.numCols;
              int indexDst = i;
  
              for( int j = 0; j < A.numCols; j += blockLength ) {
                  int blockWidth = Math.min( blockLength , A.numCols - j);
  
  //                int indexSrc = i*A.numCols + j;
  //                int indexDst = j*A_tran.numCols + i;
  
                  int indexSrcEnd = indexSrc + blockWidth;
  //                for( int l = 0; l < blockWidth; l++ , indexSrc++ ) {
                  for( ; indexSrc < indexSrcEnd;  indexSrc++ ) {
                      int rowSrc = indexSrc;
                      int rowDst = indexDst;
                      int end = rowDst + blockHeight;
  //                    for( int k = 0; k < blockHeight; k++ , rowSrc += A.numCols ) {
                      for( ; rowDst < end; rowSrc += A.numCols ) {
                          // faster to write in sequence than to read in sequence
                          A_tran.data[ rowDst++ ] = A.data[ rowSrc ];
                      }
                      indexDst += A_tran.numCols;
                  }
              }
          }
      }
docs: Performs a transpose across block sub-matrices.  Reduces
  the number of cache misses on larger matrices.
  
  *NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:
  - Q6600 Almost twice as fast as standard.
  - Pentium-M Same speed and some times a bit slower than standard.
  
  @param A Original matrix.  Not modified.
  @param A_tran Transposed matrix.  Modified.
  @param blockLength Length of a block.