Table of Contents

Struct UnaryScalarKernelKey

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Cache key for unary scalar operation kernels. Identifies a unique kernel by input type, output type, and operation.

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

Remarks

Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate type varies based on input/output types, so we store as System.Delegate.

Constructors

UnaryScalarKernelKey(NPTypeCode, NPTypeCode, UnaryOp)

Cache key for unary scalar operation kernels. Identifies a unique kernel by input type, output type, and operation.

public UnaryScalarKernelKey(NPTypeCode InputType, NPTypeCode OutputType, UnaryOp Op)

Parameters

InputType NPTypeCode
OutputType NPTypeCode
Op UnaryOp

Remarks

Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate type varies based on input/output types, so we store as System.Delegate.

Properties

InputType

public NPTypeCode InputType { get; init; }

Property Value

NPTypeCode

IsSameType

Returns true if input and output types are the same.

public bool IsSameType { get; }

Property Value

bool

Op

public UnaryOp Op { get; init; }

Property Value

UnaryOp

OutputType

public NPTypeCode OutputType { 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.