Class DenseSemiringMatMult
java.lang.Object
org.flag4j.linalg.ops.dense.semiring_ops.DenseSemiringMatMult
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
voidComputes the matrix multiplication of two dense matrices using a blocked algorithm.static <T extends Semiring<T>>
voidblockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidblockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a blocked algorithm.static <T extends Semiring<T>>
voidconcurrentBlocked
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidconcurrentBlockedReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.static <T extends Semiring<T>>
voidconcurrentBlockedVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of a blocked algorithm.static <T extends Semiring<T>>
voidconcurrentReordered
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidconcurrentStandard
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidconcurrentStandardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of the standard matrix multiplication algorithm.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.static <T extends Semiring<T>>
voidComputes the matrix multiplication between two dense matrices using the standard algorithm.static <T extends Semiring<T>>
voidstandardVector
(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using the standard algorithm.
-
Method Details
-
standard
public static <T extends Semiring<T>> void standard(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between two dense matrices using the standard algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
reordered
public static <T extends Semiring<T>> void reordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication between two dense matrices using the standard algorithm with j-k loops swapped.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
blocked
public static <T extends Semiring<T>> void blocked(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
blockedReordered
public static <T extends Semiring<T>> void blockedReordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a blocked algorithm with the j-k loops swapped.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentStandard
public static <T extends Semiring<T>> void concurrentStandard(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentReordered
public static <T extends Semiring<T>> void concurrentReordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentBlocked
public static <T extends Semiring<T>> void concurrentBlocked(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentBlockedReordered
public static <T extends Semiring<T>> void concurrentBlockedReordered(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the matrix multiplication of two dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
standardVector
public static <T extends Semiring<T>> void standardVector(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using the standard algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
blockedVector
public static <T extends Semiring<T>> void blockedVector(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a blocked algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentStandardVector
public static <T extends Semiring<T>> void concurrentStandardVector(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of the standard matrix multiplication algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-
concurrentBlockedVector
public static <T extends Semiring<T>> void concurrentBlockedVector(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the multiplication of a dense matrix with a dense vector using a concurrent implementation of a blocked algorithm.- Parameters:
src1
- Entries of the first matrix.shape1
- Shape of the first matrix.src2
- Entries of the second matrix.shape2
- Shape fo the second matrix.dest
- Array to store resulting matrix multiplication in.
-