Struct ComparisonKernelKey
Cache key for comparison operation kernels. Identifies a unique kernel by LHS type, RHS type, operation, and execution path. Result type is always bool (NPTypeCode.Boolean).
public readonly record struct ComparisonKernelKey : IEquatable<ComparisonKernelKey>
- Implements
- Inherited Members
- Extension Methods
Remarks
Supports up to 4,320 unique kernels: 12 × 12 × 6 × 5 = 4,320 (12 LHS types × 12 RHS types × 6 comparison ops × 5 paths)
Constructors
ComparisonKernelKey(NPTypeCode, NPTypeCode, ComparisonOp, ExecutionPath)
Cache key for comparison operation kernels. Identifies a unique kernel by LHS type, RHS type, operation, and execution path. Result type is always bool (NPTypeCode.Boolean).
public ComparisonKernelKey(NPTypeCode LhsType, NPTypeCode RhsType, ComparisonOp Op, ExecutionPath Path)
Parameters
LhsTypeNPTypeCodeRhsTypeNPTypeCodeOpComparisonOpPathExecutionPath
Remarks
Supports up to 4,320 unique kernels: 12 × 12 × 6 × 5 = 4,320 (12 LHS types × 12 RHS types × 6 comparison ops × 5 paths)
Properties
ComparisonType
Get the common type for comparison (promote both operands to this type).
public NPTypeCode ComparisonType { get; }
Property Value
IsSameType
Returns true if both input types are the same (no conversion needed for comparison).
public bool IsSameType { get; }
Property Value
LhsType
public NPTypeCode LhsType { get; init; }
Property Value
Op
public ComparisonOp Op { get; init; }
Property Value
Path
public ExecutionPath Path { get; init; }
Property Value
ResultType
Result type is always bool for comparisons.
public NPTypeCode ResultType { get; }
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.