Class RealDenseMatMult
java.lang.Object
org.flag4j.linalg.ops.dense.real.RealDenseMatMult
This class contains several low level methods for computing matrix-matrix multiplications.
WARNING: These methods do not perform any sanity checks.
WARNING: These methods do not perform any sanity checks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double[]Computes the matrix multiplication of two real dense matrices using a blocked algorithm.static double[]blockedReordered(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real dense matrices using a blocked algorithm with the j-k loops swapped.static double[]blockedVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real dense vector using a blocked algorithm.static double[]concurrentBlocked(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real dense matrices using a concurrent implementation of a blocked algorithm.static double[]concurrentBlockedReordered(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real dense matrices using a concurrent implementation of a blocked algorithm with the j-k loops swapped.static double[]concurrentBlockedVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real dense vector using a concurrent implementation of a blocked algorithm.static double[]concurrentReordered(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real dense matrices using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.static double[]concurrentStandard(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real dense matrices using a concurrent implementation of the standard matrix multiplication algorithm.static double[]concurrentStandardVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real dense vector using a concurrent implementation of the standard matrix multiplication algorithm.static double[]Computes the matrix multiplication between two real dense matrices using the standard algorithm with j-k loops swapped.static double[]Computes the matrix multiplication between two real dense matrices using the standard algorithm.static double[]standardVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real dense vector using the standard algorithm.
-
Method Details
-
standard
Computes the matrix multiplication between two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
reordered
Computes the matrix multiplication between two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
blocked
Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
blockedReordered
Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentStandard
Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentReordered
public static double[] concurrentReordered(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentBlocked
Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentBlockedReordered
public static double[] concurrentBlockedReordered(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the matrix multiplication of two real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
standardVector
Computes the multiplication of a real dense matrix with a real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
blockedVector
Computes the multiplication of a real dense matrix with a real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentStandardVector
public static double[] concurrentStandardVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real 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.- Returns:
- The result of matrix multiplying the two matrices.
-
concurrentBlockedVector
public static double[] concurrentBlockedVector(double[] src1, Shape shape1, double[] src2, Shape shape2) Computes the multiplication of a real dense matrix with a real 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.- Returns:
- The result of matrix multiplying the two matrices.
-