Table of Contents

Struct ComparisonScalarKernelKey

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Cache key for comparison scalar operation kernels. Identifies a unique kernel by LHS type, RHS type, and comparison operation. Result type is always bool.

public readonly record struct ComparisonScalarKernelKey : IEquatable<ComparisonScalarKernelKey>
Implements
Inherited Members
Extension Methods

Remarks

Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate signature is Func<TLhs, TRhs, bool>.

Constructors

ComparisonScalarKernelKey(NPTypeCode, NPTypeCode, ComparisonOp)

Cache key for comparison scalar operation kernels. Identifies a unique kernel by LHS type, RHS type, and comparison operation. Result type is always bool.

public ComparisonScalarKernelKey(NPTypeCode LhsType, NPTypeCode RhsType, ComparisonOp Op)

Parameters

LhsType NPTypeCode
RhsType NPTypeCode
Op ComparisonOp

Remarks

Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate signature is Func<TLhs, TRhs, bool>.

Properties

ComparisonType

Get the common type to use for comparison (both operands promoted to this type).

public NPTypeCode ComparisonType { get; }

Property Value

NPTypeCode

IsSameType

Returns true if both operand types are the same.

public bool IsSameType { get; }

Property Value

bool

LhsType

public NPTypeCode LhsType { get; init; }

Property Value

NPTypeCode

Op

public ComparisonOp Op { get; init; }

Property Value

ComparisonOp

RhsType

public NPTypeCode RhsType { get; init; }

Property Value

NPTypeCode

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.