Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For dense matrix computations, The block-partitioned algorithms used to minimize data movement and network cost. Dense Matrix and Blocked Dense Matrix are both stored in one table with other metadata.

( BTW, How to synchronize them? Should we blocking when operate something? – Edward

No Format

  // Generate matrix with random elements
  DenseMatrix a = DenseMatrix.random(conf, 1000, 1000);
  DenseMatrix b = DenseMatrix.random(conf, 1000, 1000);
  
  // The type of the Matrix to be blocked, must be dense.
  a.blocking();
  b.blocking();

  DenseMatrix c = a.mult(b);

For example, The matrix multiplication of the original arrays can be transformed into matrix multiplication of blocks as describe below.

...

No Format
C                 A               B
+-----+-----+     +-----+-----+   +-----+-----+
| x x |     |     | --> | --> |   | | | |     |
| x x |     |     | --> | --> |   | ↓ ↓ |     |
+-----+-----+  =  +-----+-----+ * +-----+-----+
|     |     |     |     |     |   | | | |     |
|     |     |     |     |     |   | ↓ ↓ |     |
+-----+-----+     +-----+-----+   +-----+-----+

– To be statically sized blocks, What should we do? – Edward