Class RealFieldDenseMatMult

java.lang.Object
org.flag4j.linalg.ops.dense.real_field_ops.RealFieldDenseMatMult

public final class RealFieldDenseMatMult extends Object

This class contains several low level methods for computing dense matrix-matrix multiplications between one field matrix and one real matrix.

Warning: This class does not perform any sanity checks on the input.

  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    blocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.
    static <T extends Field<T>>
    void
    blocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm.
    static <T extends Field<T>>
    void
    blockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    blockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    blockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a blocked algorithm.
    static <T extends Field<T>>
    void
    blockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a blocked algorithm.
    static <T extends Field<T>>
    void
    concurrentBlocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    concurrentBlocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    concurrentBlockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    concurrentBlockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of a blocked algorithm with the j-k loops swapped.
    static <T extends Field<T>>
    void
    concurrentBlockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    concurrentBlockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of a blocked algorithm.
    static <T extends Field<T>>
    void
    concurrentReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    concurrentReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    concurrentStandard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    concurrentStandard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication of a real dense matrix with a dense field matrix using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    concurrentStandardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    concurrentStandardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using a concurrent implementation of the standard matrix multiplication algorithm.
    static <T extends Field<T>>
    void
    reordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    reordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm with j-k loops swapped.
    static <T extends Field<T>>
    void
    standard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.
    static <T extends Field<T>>
    void
    standard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the matrix multiplication between a real dense matrix with a dense field matrix using the standard algorithm.
    static <T extends Field<T>>
    void
    standardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using the standard algorithm.
    static <T extends Field<T>>
    void
    standardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
    Computes the multiplication of a real dense matrix with a dense field vector using the standard algorithm.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • standard

      public static <T extends Field<T>> void standard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication between a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • reordered

      public static <T extends Field<T>> void reordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication between a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • blocked

      public static <T extends Field<T>> void blocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • blockedReordered

      public static <T extends Field<T>> void blockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentStandard

      public static <T extends Field<T>> void concurrentStandard(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentReordered

      public static <T extends Field<T>> void concurrentReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentBlocked

      public static <T extends Field<T>> void concurrentBlocked(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentBlockedReordered

      public static <T extends Field<T>> void concurrentBlockedReordered(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • standardVector

      public static <T extends Field<T>> void standardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • blockedVector

      public static <T extends Field<T>> void blockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • concurrentStandardVector

      public static <T extends Field<T>> void concurrentStandardVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • concurrentBlockedVector

      public static <T extends Field<T>> void concurrentBlockedVector(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • standard

      public static <T extends Field<T>> void standard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication between a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • reordered

      public static <T extends Field<T>> void reordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication between a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • blocked

      public static <T extends Field<T>> void blocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • blockedReordered

      public static <T extends Field<T>> void blockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentStandard

      public static <T extends Field<T>> void concurrentStandard(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentReordered

      public static <T extends Field<T>> void concurrentReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentBlocked

      public static <T extends Field<T>> void concurrentBlocked(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • concurrentBlockedReordered

      public static <T extends Field<T>> void concurrentBlockedReordered(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the matrix multiplication of a real dense matrix with a dense field matrix 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 result of the matrix multiplication in (modified). Must have size length shape1.get(0)*shape2.get(1).
    • standardVector

      public static <T extends Field<T>> void standardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • blockedVector

      public static <T extends Field<T>> void blockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • concurrentStandardVector

      public static <T extends Field<T>> void concurrentStandardVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].
    • concurrentBlockedVector

      public static <T extends Field<T>> void concurrentBlockedVector(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest)
      Computes the multiplication of a real dense matrix with a dense field 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 result of the matrix-vector multiplication in (modified). Must have size length shape1.get(0)].