Record Class SafeTensors.Source
java.lang.Object
java.lang.Record
ai.beestream.jitnn.io.SafeTensors.Source
- Enclosing class:
SafeTensors
public static record SafeTensors.Source(DType dtype, long[] shape, MemorySegment data)
extends Record
The data to write for one tensor: its type, shape, and a segment of exactly its bytes.
-
Constructor Summary
ConstructorsConstructorDescriptionSource(DType dtype, long[] shape, MemorySegment data) Creates an instance of aSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.dtype()Returns the value of thedtyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.long[]shape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Source
Creates an instance of aSourcerecord class.- Parameters:
dtype- the value for thedtyperecord componentshape- the value for theshaperecord componentdata- the value for thedatarecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
dtype
Returns the value of thedtyperecord component.- Returns:
- the value of the
dtyperecord component
-
shape
public long[] shape()Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-