Struct MTLSize
Represents Metal threadgroup and thread dimensions.
public readonly struct MTLSize : IEquatable<MTLSize>
- Implements
- Inherited Members
Remarks
Initializes a new instance of the MTLSize struct.
Constructors
MTLSize(uint, uint, uint)
Represents Metal threadgroup and thread dimensions.
public MTLSize(uint width, uint height, uint depth)
Parameters
Remarks
Initializes a new instance of the MTLSize struct.
Properties
Depth
Depth dimension.
public uint Depth { get; }
Property Value
Height
Height dimension.
public uint Height { get; }
Property Value
TotalElements
Gets the total number of elements.
public uint TotalElements { get; }
Property Value
Width
Width dimension.
public uint Width { get; }
Property Value
Methods
Equals(MTLSize)
Determines whether the specified MTLSize is equal to the current MTLSize.
public bool Equals(MTLSize other)
Parameters
otherMTLSizeThe MTLSize to compare with the current MTLSize.
Returns
- bool
true if the specified MTLSize is equal to the current MTLSize; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current MTLSize.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current MTLSize.
Returns
- bool
true if the specified object is equal to the current MTLSize; otherwise, false.
GetHashCode()
Returns the hash code for this MTLSize.
public override int GetHashCode()
Returns
- int
A hash code for the current MTLSize.
Make(uint)
Creates a 1D MTLSize.
public static MTLSize Make(uint width)
Parameters
widthuintThe width dimension.
Returns
- MTLSize
A new MTLSize instance.
Make(uint, uint)
Creates a 2D MTLSize.
public static MTLSize Make(uint width, uint height)
Parameters
Returns
- MTLSize
A new MTLSize instance.
Make(uint, uint, uint)
Creates a 3D MTLSize.
public static MTLSize Make(uint width, uint height, uint depth)
Parameters
Returns
- MTLSize
A new MTLSize instance.
ToString()
Returns a string representation of this MTLSize.
public override string ToString()
Returns
- string
A string representation.
Operators
operator ==(MTLSize, MTLSize)
Determines whether two MTLSize instances are equal.
public static bool operator ==(MTLSize left, MTLSize right)
Parameters
Returns
- bool
true if the two MTLSize instances are equal; otherwise, false.
operator !=(MTLSize, MTLSize)
Determines whether two MTLSize instances are not equal.
public static bool operator !=(MTLSize left, MTLSize right)
Parameters
Returns
- bool
true if the two MTLSize instances are not equal; otherwise, false.