public MetricComparisonSpec(MetricKind Baseline, MetricKind Bench, PrimalKind Primitive, OpKind Operator) { this.BaseKind = Baseline; this.BenchKind = Bench; this.Primitive = Primitive; this.Operator = Operator; }
public static OpId OpId(this OpKind op, NumericSystem system, PrimalKind prim, NumericKind numKind = NumericKind.Native, Genericity generic = Genericity.Direct, OpFusion fusion = OpFusion.Atomic, string title = null) => new OpId(system, op, prim, numKind, generic, fusion, title);
public OpId(NumericSystem NumSystem, OpKind OpKind, PrimalKind OperandKind, NumericKind NumKind, Genericity Generic, OpFusion Fusion, string OpTitle) { this.NumSystem = NumSystem; this.OpKind = OpKind; this.OperandType = OperandKind; this.NumKind = NumKind; this.Generic = Generic; this.Fusion = Fusion; this.OpTitle = ifEmpty(OpTitle, OpId.DefineOpTitle(this)); this.OpUri = BuildOpUri(this); }
public MetricSpec(OpKind OpKind, NumericSystem NumSystem, NumericKind NumKind, PrimalKind OperandType, OpVariance Variance, ByteSize OperandSize) { this.OpKind = OpKind; this.NumSystem = NumSystem; this.NumKind = NumKind; this.OperandType = OperandType; this.Variance = Variance; this.OperandSize = OperandSize; }
public static MetricSpec Define(OpKind OpKind, NumericSystem NumSystem, NumericKind NumKind, PrimalKind OperandType, OpVariance Variance, ByteSize OperandSize) => new MetricSpec(OpKind, NumSystem, NumKind, OperandType, Variance, OperandSize);
public static MetricComparisonSpec DefineComparison(this MetricKind Baseline, MetricKind Bench, PrimalKind Primitive, OpKind Operator) => MetricComparisonSpec.Define(Baseline, Bench, Primitive, Operator);
public static void Deconstruct(this MetricId metric, out MetricKind Classifier, out PrimalKind Primitive, out OpKind Operator) { Classifier = metric.Classifier; Primitive = metric.Primitive; Operator = metric.Operator; }
public static MetricId Identify(this MetricKind metric, PrimalKind primitive, OpKind op) => MetricId.Define(metric, primitive, op);
public ParamSig(int Position, PrimalKind DataType, ParamVariance Variance) { this.Position = Position; this.Primitive = DataType; this.Variance = Variance; }
public static ParamSig Create(int pos, PrimalKind dataType, ParamVariance?variance = null) => new ParamSig(pos, dataType, variance ?? ParamVariance.Value);
public static MetricId Define(MetricKind Classifier, PrimalKind Primitive, OpKind Operator) => new MetricId(Classifier, Primitive, Operator);
public static MetricComparisonSpec Define(MetricKind Baseline, MetricKind Bench, PrimalKind Primitive, OpKind Operator) => new MetricComparisonSpec(Baseline, Bench, Primitive, Operator);
public static MetricComparisonSpec Define <T>(MetricKind Baseline, MetricKind Bench, PrimalKind Primitive, OpKind Operator) where T : struct => new MetricComparisonSpec(Baseline, Bench, PrimalKinds.kind <T>(), Operator);
public static OpType WithType(this OpKind src, PrimalKind prim) => OpType.Define(src, prim);