TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Plan.Dispatch

Static Posit storage-plan dispatch #

Public posits choose their carrier from a type-static width. This module turns that chosen StoragePlan constructor into one independently certified capability per operation. Keeping the capabilities operation-indexed lets a monomorphic public call reduce to its first-order backend without allocating a package of unrelated function fields.

An abstract or custom codec still receives the representation-independent candidate set. A closed public width reduces its carrier match at compile time. Packed-word, packed-pair, and wide plans then name their single proved kernel directly. Byte plans retain policy-sensitive selection between exhaustive tables and direct arithmetic because setup cost and residency depend on the width, operation arity, and workload policy.

@[instance_reducible, always_inline]

Addition capability selected directly from a storage-plan constructor.

The byte plan retains its policy-sensitive table portfolio. Every other built-in plan has one first-order winner, so its capability is constructed directly from that operation's kernel. This definition is deliberately inlined: a closed public width reduces the plan match at compile time and leaves only the named carrier kernel in the generated hot path.

Instances For
    @[instance_reducible, always_inline]

    Subtraction capability selected directly from a storage-plan constructor.

    Instances For
      @[instance_reducible, always_inline]

      Multiplication capability selected directly from a storage-plan constructor.

      Instances For
        @[instance_reducible, always_inline]

        Division capability selected directly from a storage-plan constructor.

        Instances For
          @[instance_reducible, always_inline]

          Square-root capability selected directly from a storage-plan constructor.

          Instances For
            @[instance_reducible, always_inline]

            Fused-multiply-add capability selected directly from a storage-plan constructor.

            Instances For

              Built-in storage-plan instances have higher priority than the representation-independent instance. Their inline operation-specific constructors specialize a closed public width to one carrier and one first-order executor. Custom codecs retain the generic certified candidate portfolios below.

              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible, always_inline, instance 1100]
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.addCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Add (Family format code plan)
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.subCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Sub (Family format code plan)
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.mulCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Mul (Family format code plan)
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.divCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Div (Family format code plan)
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.sqrtCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Sqrt (Family format code plan)
              @[instance_reducible]
              instance FloatLib.Floats.Formats.Posit.Configured.fmaCapability (format : Format) (plan : StoragePlan format) (code : Type) [ExecFloat.ModelCodec plan (Model format) code] [ExecFloat.Backend.PolicyFor (Family format code plan)] :
              ExecFloat.Fma (Family format code plan)