org.ejml.alg.dense.mult
Class MatrixMatrixMult

java.lang.Object
  extended by org.ejml.alg.dense.mult.MatrixMatrixMult

public class MatrixMatrixMult
extends Object

This class contains various types of matrix matrix multiplication operations for RowD1Matrix64F.

Two algorithms that are equivalent can often have very different runtime performance. This is because of how modern computers uses fast memory caches to speed up reading/writing to data. Depending on the order in which variables are processed different algorithms can run much faster than others, even if the number of operations is the same.

Algorithms that are labeled as 'reorder' are designed to avoid caching jumping issues, some times at the cost of increasing the number of operations. This is important for large matrices. The straight forward implementation seems to be faster for small matrices.

Algorithms that are labeled as 'aux' use an auxiliary array of length n. This array is used to create a copy of an out of sequence column vector that is referenced several times. This reduces the number of cache misses. If the 'aux' parameter passed in is null then the array is declared internally.

Typically the straight forward implementation runs about 30% faster on smaller matrices and about 5 times slower on larger matrices. This is all computer architecture and matrix shape/size specific.

******** IMPORTANT **********
This class was auto generated using GeneratorMatrixMatrixMult If this code needs to be modified, please modify GeneratorMatrixMatrixMult instead and regenerate the code by running that.

Author:
Peter Abeles

Constructor Summary
MatrixMatrixMult()
           
 
Method Summary
static void mult_aux(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void mult_aux(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void mult_reorder(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void mult_reorder(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void mult_small(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void mult_small(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAdd_aux(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multAdd_aux(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multAdd_reorder(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAdd_reorder(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAdd_small(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAdd_small(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransA_reorder(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransA_reorder(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransA_small(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransA_small(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransAB_aux(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multAddTransAB_aux(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multAddTransAB(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransAB(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransB(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multAddTransB(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransA_reorder(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransA_reorder(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransA_small(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransA_small(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransAB_aux(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multTransAB_aux(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c, double[] aux)
           
static void multTransAB(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransAB(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransB(double alpha, RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
static void multTransB(RowD1Matrix64F a, RowD1Matrix64F b, RowD1Matrix64F c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixMatrixMult

public MatrixMatrixMult()
Method Detail

mult_reorder

public static void mult_reorder(RowD1Matrix64F a,
                                RowD1Matrix64F b,
                                RowD1Matrix64F c)
See Also:
CommonOps.mult( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

mult_small

public static void mult_small(RowD1Matrix64F a,
                              RowD1Matrix64F b,
                              RowD1Matrix64F c)
See Also:
CommonOps.mult( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

mult_aux

public static void mult_aux(RowD1Matrix64F a,
                            RowD1Matrix64F b,
                            RowD1Matrix64F c,
                            double[] aux)
See Also:
CommonOps.mult( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransA_reorder

public static void multTransA_reorder(RowD1Matrix64F a,
                                      RowD1Matrix64F b,
                                      RowD1Matrix64F c)
See Also:
CommonOps.multTransA( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransA_small

public static void multTransA_small(RowD1Matrix64F a,
                                    RowD1Matrix64F b,
                                    RowD1Matrix64F c)
See Also:
CommonOps.multTransA( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransAB

public static void multTransAB(RowD1Matrix64F a,
                               RowD1Matrix64F b,
                               RowD1Matrix64F c)
See Also:
CommonOps.multTransAB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransAB_aux

public static void multTransAB_aux(RowD1Matrix64F a,
                                   RowD1Matrix64F b,
                                   RowD1Matrix64F c,
                                   double[] aux)
See Also:
CommonOps.multTransAB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransB

public static void multTransB(RowD1Matrix64F a,
                              RowD1Matrix64F b,
                              RowD1Matrix64F c)
See Also:
CommonOps.multTransB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_reorder

public static void multAdd_reorder(RowD1Matrix64F a,
                                   RowD1Matrix64F b,
                                   RowD1Matrix64F c)
See Also:
CommonOps.multAdd( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_small

public static void multAdd_small(RowD1Matrix64F a,
                                 RowD1Matrix64F b,
                                 RowD1Matrix64F c)
See Also:
CommonOps.multAdd( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_aux

public static void multAdd_aux(RowD1Matrix64F a,
                               RowD1Matrix64F b,
                               RowD1Matrix64F c,
                               double[] aux)
See Also:
CommonOps.multAdd( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransA_reorder

public static void multAddTransA_reorder(RowD1Matrix64F a,
                                         RowD1Matrix64F b,
                                         RowD1Matrix64F c)
See Also:
CommonOps.multAddTransA( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransA_small

public static void multAddTransA_small(RowD1Matrix64F a,
                                       RowD1Matrix64F b,
                                       RowD1Matrix64F c)
See Also:
CommonOps.multAddTransA( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransAB

public static void multAddTransAB(RowD1Matrix64F a,
                                  RowD1Matrix64F b,
                                  RowD1Matrix64F c)
See Also:
CommonOps.multAddTransAB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransAB_aux

public static void multAddTransAB_aux(RowD1Matrix64F a,
                                      RowD1Matrix64F b,
                                      RowD1Matrix64F c,
                                      double[] aux)
See Also:
CommonOps.multAddTransAB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransB

public static void multAddTransB(RowD1Matrix64F a,
                                 RowD1Matrix64F b,
                                 RowD1Matrix64F c)
See Also:
CommonOps.multAddTransB( org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

mult_reorder

public static void mult_reorder(double alpha,
                                RowD1Matrix64F a,
                                RowD1Matrix64F b,
                                RowD1Matrix64F c)
See Also:
CommonOps.mult(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

mult_small

public static void mult_small(double alpha,
                              RowD1Matrix64F a,
                              RowD1Matrix64F b,
                              RowD1Matrix64F c)
See Also:
CommonOps.mult(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

mult_aux

public static void mult_aux(double alpha,
                            RowD1Matrix64F a,
                            RowD1Matrix64F b,
                            RowD1Matrix64F c,
                            double[] aux)
See Also:
CommonOps.mult(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransA_reorder

public static void multTransA_reorder(double alpha,
                                      RowD1Matrix64F a,
                                      RowD1Matrix64F b,
                                      RowD1Matrix64F c)
See Also:
CommonOps.multTransA(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransA_small

public static void multTransA_small(double alpha,
                                    RowD1Matrix64F a,
                                    RowD1Matrix64F b,
                                    RowD1Matrix64F c)
See Also:
CommonOps.multTransA(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransAB

public static void multTransAB(double alpha,
                               RowD1Matrix64F a,
                               RowD1Matrix64F b,
                               RowD1Matrix64F c)
See Also:
CommonOps.multTransAB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransAB_aux

public static void multTransAB_aux(double alpha,
                                   RowD1Matrix64F a,
                                   RowD1Matrix64F b,
                                   RowD1Matrix64F c,
                                   double[] aux)
See Also:
CommonOps.multTransAB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multTransB

public static void multTransB(double alpha,
                              RowD1Matrix64F a,
                              RowD1Matrix64F b,
                              RowD1Matrix64F c)
See Also:
CommonOps.multTransB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_reorder

public static void multAdd_reorder(double alpha,
                                   RowD1Matrix64F a,
                                   RowD1Matrix64F b,
                                   RowD1Matrix64F c)
See Also:
CommonOps.multAdd(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_small

public static void multAdd_small(double alpha,
                                 RowD1Matrix64F a,
                                 RowD1Matrix64F b,
                                 RowD1Matrix64F c)
See Also:
CommonOps.multAdd(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAdd_aux

public static void multAdd_aux(double alpha,
                               RowD1Matrix64F a,
                               RowD1Matrix64F b,
                               RowD1Matrix64F c,
                               double[] aux)
See Also:
CommonOps.multAdd(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransA_reorder

public static void multAddTransA_reorder(double alpha,
                                         RowD1Matrix64F a,
                                         RowD1Matrix64F b,
                                         RowD1Matrix64F c)
See Also:
CommonOps.multAddTransA(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransA_small

public static void multAddTransA_small(double alpha,
                                       RowD1Matrix64F a,
                                       RowD1Matrix64F b,
                                       RowD1Matrix64F c)
See Also:
CommonOps.multAddTransA(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransAB

public static void multAddTransAB(double alpha,
                                  RowD1Matrix64F a,
                                  RowD1Matrix64F b,
                                  RowD1Matrix64F c)
See Also:
CommonOps.multAddTransAB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransAB_aux

public static void multAddTransAB_aux(double alpha,
                                      RowD1Matrix64F a,
                                      RowD1Matrix64F b,
                                      RowD1Matrix64F c,
                                      double[] aux)
See Also:
CommonOps.multAddTransAB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)

multAddTransB

public static void multAddTransB(double alpha,
                                 RowD1Matrix64F a,
                                 RowD1Matrix64F b,
                                 RowD1Matrix64F c)
See Also:
CommonOps.multAddTransB(double, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F, org.ejml.data.RowD1Matrix64F)


Copyright © 2012. All Rights Reserved.