public class BlockMultiply extends Object implements Callable<Void>
C(fromM->toM, fromK->toK) +=
     
A(fromM->toM, fromN->toN) x B(fromN->toN, fromK->toK)
All blocks must be square blocks of the same size, with length of one side =
blockStripeSize
| Constructor and Description |
|---|
BlockMultiply(BlockDenseDoubleMatrix2D a,
BlockDenseDoubleMatrix2D b,
BlockDenseDoubleMatrix2D c,
int fromM,
int toM,
int fromN,
int toN,
int fromK,
int toK)
Constructor taking the two matrices being multiplied, the target matrix C
and the range of rows and columns to multiply.
|
| Modifier and Type | Method and Description |
|---|---|
Void |
call() |
protected void |
multiply()
Multiply blocks of two matrices A,B and add to C.
|
void |
multiplyRowMajorTimesColumnMajorBlocks(double[] aBlock,
double[] bBlock,
double[] cBlock,
int aRows,
int bRows,
int bCols) |
public BlockMultiply(BlockDenseDoubleMatrix2D a, BlockDenseDoubleMatrix2D b, BlockDenseDoubleMatrix2D c, int fromM, int toM, int fromN, int toN, int fromK, int toK)
a - - matrix A, size (M, N)b - - matrix B, size (N, K)c - - result matrix C, size (M, K)fromM - - start row M in matrix AtoM - - end row M in AfromN - - start column N in A (or start row N in B)toN - - end row NfromK - - start column K in BtoK - - end column K in Bprotected final void multiply()
Blocks of Matrix B are transformed to column-major layout (if not
already) to facilitate multiplication.
(If matrices have been created optimally, B should already be
column-major)
public void multiplyRowMajorTimesColumnMajorBlocks(double[] aBlock,
double[] bBlock,
double[] cBlock,
int aRows,
int bRows,
int bCols)
Copyright © 2015 Universal Java Matrix Package. All rights reserved.