Struct Dimensions3D
- Namespace
- DotCompute.Runtime.Services.Types
- Assembly
- DotCompute.Runtime.dll
Represents 3D dimensions for kernel execution.
public readonly struct Dimensions3D : IEquatable<Dimensions3D>
- Implements
- Inherited Members
Constructors
Dimensions3D(int, int, int)
Initializes a new instance of the Dimensions3D struct.
public Dimensions3D(int x, int y = 1, int z = 1)
Parameters
Properties
TotalElements
Gets the total number of elements (X * Y * Z).
public int TotalElements { get; }
Property Value
X
Gets the X dimension.
public int X { get; }
Property Value
Y
Gets the Y dimension.
public int Y { get; }
Property Value
Z
Gets the Z dimension.
public int Z { get; }
Property Value
Methods
Equals(Dimensions3D)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Dimensions3D other)
Parameters
otherDimensions3DAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(Dimensions3D, Dimensions3D)
Equality operator.
public static bool operator ==(Dimensions3D left, Dimensions3D right)
Parameters
leftDimensions3DrightDimensions3D
Returns
operator !=(Dimensions3D, Dimensions3D)
Inequality operator.
public static bool operator !=(Dimensions3D left, Dimensions3D right)
Parameters
leftDimensions3DrightDimensions3D