code: public static long wrapped(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj c )
      {
          long timeBefore = System.currentTimeMillis();
          double valA;
          int indexCbase= 0;
          int endOfKLoop = b.numRows*b.numCols;
  
          for( int i = 0; i < a.numRows; i++ ) {
              int indexA = i*a.numCols;
  
              // need to assign dataC to a value initially
              int indexB = 0;
              int indexC = indexCbase;
              int end = indexB + b.numCols;
  
              valA = a.get(indexA++);
  
              while( indexB < end ) {
                  c.set( indexC++ , valA*b.get(indexB++));
              }
  
              // now add to it
              while( indexB != endOfKLoop ) { // k loop
                  indexC = indexCbase;
                  end = indexB + b.numCols;
  
                  valA = a.get(indexA++);
  
                  while( indexB < end ) { // j loop
                      c.plus( indexC++ , valA*b.get(indexB++));
                  }
              }
              indexCbase += c.numCols;
          }
  
          return System.currentTimeMillis() - timeBefore;
      }
docs: Wrapper functions with no bounds checking are used to access matrix internals