Table of Contents

Struct MTLSize

Namespace
DotCompute.Backends.Metal.Execution.Graph.Types
Assembly
DotCompute.Backends.Metal.dll

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

width uint

The width dimension.

height uint

The height dimension.

depth uint

The depth dimension.

Remarks

Initializes a new instance of the MTLSize struct.

Properties

Depth

Depth dimension.

public uint Depth { get; }

Property Value

uint

Height

Height dimension.

public uint Height { get; }

Property Value

uint

TotalElements

Gets the total number of elements.

public uint TotalElements { get; }

Property Value

uint

Width

Width dimension.

public uint Width { get; }

Property Value

uint

Methods

Equals(MTLSize)

Determines whether the specified MTLSize is equal to the current MTLSize.

public bool Equals(MTLSize other)

Parameters

other MTLSize

The 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

obj object

The 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

width uint

The width dimension.

Returns

MTLSize

A new MTLSize instance.

Make(uint, uint)

Creates a 2D MTLSize.

public static MTLSize Make(uint width, uint height)

Parameters

width uint

The width dimension.

height uint

The height dimension.

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

width uint

The width dimension.

height uint

The height dimension.

depth uint

The depth dimension.

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

left MTLSize

The first MTLSize to compare.

right MTLSize

The second MTLSize to compare.

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

left MTLSize

The first MTLSize to compare.

right MTLSize

The second MTLSize to compare.

Returns

bool

true if the two MTLSize instances are not equal; otherwise, false.