Declarative typing rule for the operands of an operation.
A rule declares a small set of free variables, the pivots, and binds every operand to one of them through a transform. It is the single source of truth for an operation's typing: two interpreters read this very same declaration, and neither restates it.
- type_rule_interpreter evaluates it on runtime numerical_type values, to deduce the canonical output types and to accept or reject user supplied ones.
- The backend rule type dispatchers evaluate it on native C++ types, to reify the operand element types of the program being built. Because they dispatch the pivots rather than the operands, the number of instantiations they produce is bounded by the pivot count rather than by the operand count.
The operand counts are part of the rule, so an operation's arity and the compile time operand counts a backend builder needs both come from here and cannot disagree.
- Template Parameters
-
- See also
- type_pivot
-
type_slot
-
Type transforms