docs: public static void convertRowToBlock( int numRows , int numCols , int blockLength ,
                                            double[] data, double[] tmp )
      {
          int minLength = Math.min( blockLength , numRows ) * numCols;
          if( tmp.length < minLength ) {
              throw new IllegalArgumentException("tmp must be at least "+minLength+" long ");
          }
  
          for( int i = 0; i < numRows; i += blockLength ) {
              int blockHeight = Math.min( blockLength , numRows - i);
  
              System.arraycopy(data,i*numCols,tmp,0,blockHeight*numCols);
  
  
              for( int j = 0; j < numCols; j += blockLength ) {
                  int blockWidth = Math.min( blockLength , numCols - j);
  
                  int indexDst = i*numCols + blockHeight*j;
                  int indexSrcRow = j;
  
                  for( int k = 0; k < blockHeight; k++ ) {
                      System.arraycopy(tmp,indexSrcRow,data,indexDst,blockWidth);
                      indexDst += blockWidth;
                      indexSrcRow += numCols;
                  }
              }
          }
      }