Table of Contents

Struct MixedTypeKernelKey

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Cache key for mixed-type binary operation kernels. Identifies a unique kernel by LHS type, RHS type, result type, operation, and execution path.

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

Remarks

Supports up to 3,600 unique kernels: 12 × 12 × 5 × 5 = 3,600 (12 LHS types × 12 RHS types × 5 operations × 5 paths, result type determined by promotion rules)

Constructors

MixedTypeKernelKey(NPTypeCode, NPTypeCode, NPTypeCode, BinaryOp, ExecutionPath)

Cache key for mixed-type binary operation kernels. Identifies a unique kernel by LHS type, RHS type, result type, operation, and execution path.

public MixedTypeKernelKey(NPTypeCode LhsType, NPTypeCode RhsType, NPTypeCode ResultType, BinaryOp Op, ExecutionPath Path)

Parameters

LhsType NPTypeCode
RhsType NPTypeCode
ResultType NPTypeCode
Op BinaryOp
Path ExecutionPath

Remarks

Supports up to 3,600 unique kernels: 12 × 12 × 5 × 5 = 3,600 (12 LHS types × 12 RHS types × 5 operations × 5 paths, result type determined by promotion rules)

Properties

IsSameType

Returns true if all three types are the same (no conversion needed).

public bool IsSameType { get; }

Property Value

bool

LhsType

public NPTypeCode LhsType { get; init; }

Property Value

NPTypeCode

NeedsLhsConversion

Returns true if the LHS needs conversion to result type.

public bool NeedsLhsConversion { get; }

Property Value

bool

NeedsRhsConversion

Returns true if the RHS needs conversion to result type.

public bool NeedsRhsConversion { get; }

Property Value

bool

Op

public BinaryOp Op { get; init; }

Property Value

BinaryOp

Path

public ExecutionPath Path { get; init; }

Property Value

ExecutionPath

ResultType

public NPTypeCode ResultType { get; init; }

Property Value

NPTypeCode

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.