Table of Contents

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

x int
y int
z int

Properties

TotalElements

Gets the total number of elements (X * Y * Z).

public int TotalElements { get; }

Property Value

int

X

Gets the X dimension.

public int X { get; }

Property Value

int

Y

Gets the Y dimension.

public int Y { get; }

Property Value

int

Z

Gets the Z dimension.

public int Z { get; }

Property Value

int

Methods

Equals(Dimensions3D)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Dimensions3D other)

Parameters

other Dimensions3D

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

left Dimensions3D
right Dimensions3D

Returns

bool

operator !=(Dimensions3D, Dimensions3D)

Inequality operator.

public static bool operator !=(Dimensions3D left, Dimensions3D right)

Parameters

left Dimensions3D
right Dimensions3D

Returns

bool