Table of Contents

Struct Dim2

Namespace
DotCompute.Abstractions.Types
Assembly
DotCompute.Abstractions.dll

Represents a 2-dimensional configuration for CUDA operations.

public struct Dim2 : IEquatable<Dim2>
Implements
Inherited Members

Remarks

Initializes a new instance of the Dim2 struct.

Constructors

Dim2(int, int)

Represents a 2-dimensional configuration for CUDA operations.

public Dim2(int x, int y)

Parameters

x int

The X dimension.

y int

The Y dimension.

Remarks

Initializes a new instance of the Dim2 struct.

Properties

X

Gets the X dimension.

public readonly int X { get; }

Property Value

int

Y

Gets the Y dimension.

public readonly int Y { get; }

Property Value

int

Methods

Equals(Dim2)

Determines whether the current instance is equal to another Dim2 instance.

public bool Equals(Dim2 other)

Parameters

other Dim2

The Dim2 instance to compare with this instance.

Returns

bool

true if the instances are equal; otherwise, false.

Equals(object?)

Determines whether the current instance is equal to a specified object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if obj is a Dim2 and is equal to this instance; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for the current instance.

ToString()

Returns a string representation of the dimensions.

public override string ToString()

Returns

string

A string in the format (X,Y).

Operators

operator ==(Dim2, Dim2)

Determines whether two Dim2 instances are equal.

public static bool operator ==(Dim2 left, Dim2 right)

Parameters

left Dim2

The first instance to compare.

right Dim2

The second instance to compare.

Returns

bool

true if the instances are equal; otherwise, false.

operator !=(Dim2, Dim2)

Determines whether two Dim2 instances are not equal.

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

Parameters

left Dim2

The first instance to compare.

right Dim2

The second instance to compare.

Returns

bool

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