Record Class PackedMatmulShape

java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.tensor.PackedMatmulShape

public record PackedMatmulShape(int leftRows, int rightRows, int rows, int cols, int inner, boolean transposeLeft, boolean transposeRight) extends Record
Logical dimensions for the compatibility API; never inferred from a GPU allocation's physical rows.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PackedMatmulShape(int leftRows, int rightRows, int rows, int cols, int inner, boolean transposeLeft, boolean transposeRight)
    Creates an instance of a PackedMatmulShape record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the cols record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the inner record component.
    int
    Returns the value of the leftRows record component.
    of(Tensor left, Tensor right, int batches, boolean ta, boolean tb)
     
    int
    Returns the value of the rightRows record component.
    int
    Returns the value of the rows record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the transposeLeft record component.
    boolean
    Returns the value of the transposeRight record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PackedMatmulShape

      public PackedMatmulShape(int leftRows, int rightRows, int rows, int cols, int inner, boolean transposeLeft, boolean transposeRight)
      Creates an instance of a PackedMatmulShape record class.
      Parameters:
      leftRows - the value for the leftRows record component
      rightRows - the value for the rightRows record component
      rows - the value for the rows record component
      cols - the value for the cols record component
      inner - the value for the inner record component
      transposeLeft - the value for the transposeLeft record component
      transposeRight - the value for the transposeRight record component
  • Method Details

    • of

      public static PackedMatmulShape of(Tensor left, Tensor right, int batches, boolean ta, boolean tb)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • leftRows

      public int leftRows()
      Returns the value of the leftRows record component.
      Returns:
      the value of the leftRows record component
    • rightRows

      public int rightRows()
      Returns the value of the rightRows record component.
      Returns:
      the value of the rightRows record component
    • rows

      public int rows()
      Returns the value of the rows record component.
      Returns:
      the value of the rows record component
    • cols

      public int cols()
      Returns the value of the cols record component.
      Returns:
      the value of the cols record component
    • inner

      public int inner()
      Returns the value of the inner record component.
      Returns:
      the value of the inner record component
    • transposeLeft

      public boolean transposeLeft()
      Returns the value of the transposeLeft record component.
      Returns:
      the value of the transposeLeft record component
    • transposeRight

      public boolean transposeRight()
      Returns the value of the transposeRight record component.
      Returns:
      the value of the transposeRight record component