Struct BinaryScalarKernelKey
Cache key for binary scalar operation kernels. Identifies a unique kernel by LHS type, RHS type, result type, and operation.
public readonly record struct BinaryScalarKernelKey : IEquatable<BinaryScalarKernelKey>
- Implements
- Inherited Members
- Extension Methods
Remarks
Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate type varies based on operand/result types, so we store as System.Delegate.
Constructors
BinaryScalarKernelKey(NPTypeCode, NPTypeCode, NPTypeCode, BinaryOp)
Cache key for binary scalar operation kernels. Identifies a unique kernel by LHS type, RHS type, result type, and operation.
public BinaryScalarKernelKey(NPTypeCode LhsType, NPTypeCode RhsType, NPTypeCode ResultType, BinaryOp Op)
Parameters
LhsTypeNPTypeCodeRhsTypeNPTypeCodeResultTypeNPTypeCodeOpBinaryOp
Remarks
Used to cache IL-generated Func delegates that eliminate dynamic dispatch overhead. The delegate type varies based on operand/result types, so we store as System.Delegate.
Properties
IsSameType
Returns true if all three types are the same.
public bool IsSameType { get; }
Property Value
LhsType
public NPTypeCode LhsType { get; init; }
Property Value
Op
public BinaryOp Op { get; init; }
Property Value
ResultType
public NPTypeCode ResultType { get; init; }
Property Value
RhsType
public NPTypeCode RhsType { get; init; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.