Package com.yahoo.config.provision
Record Class NodeResources.GpuResources
java.lang.Object
java.lang.Record
com.yahoo.config.provision.NodeResources.GpuResources
- Enclosing class:
- NodeResources
public static record NodeResources.GpuResources(NodeResources.GpuType type, int count, double memoryGiB)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGpuResources(int count, double memoryGiB) GpuResources(NodeResources.GpuType type, int count, double memoryGiB) Creates an instance of aGpuResourcesrecord class.GpuResources(String t, int count, double memoryGiB) -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.static NodeResources.GpuResourcesReturns zero gpu resources.final inthashCode()Returns a hash code value for this object.booleanbooleanisZero()doubleReturns the value of thememoryGiBrecord component.minus(NodeResources.GpuResources other) multipliedBy(double factor) plus(NodeResources.GpuResources other) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.static NodeResources.GpuResourceszero()
-
Constructor Details
-
GpuResources
public GpuResources(int count, double memoryGiB) -
GpuResources
-
GpuResources
Creates an instance of aGpuResourcesrecord class.- Parameters:
type- the value for thetyperecord componentcount- the value for thecountrecord componentmemoryGiB- the value for thememoryGiBrecord component
-
-
Method Details
-
isZero
public boolean isZero() -
zero
-
isDefault
public boolean isDefault() -
getDefault
Returns zero gpu resources. -
plus
-
minus
-
multipliedBy
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
memoryGiB
public double memoryGiB()Returns the value of thememoryGiBrecord component.- Returns:
- the value of the
memoryGiBrecord component
-