TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Format.Storage

Exact-width binary format storage #

Exact-width BitVec representations of layout masks derived from a validated FloatFormat.

The definitions centralize sign, exponent, significand, and payload masks so packing code does not reconstruct them with ad hoc shifts. They describe logical layout only; selection of UInt8, UInt16, UInt32, UInt64, or arbitrary-width storage belongs to the configured execution layer.

@[inline]

Pack a Nat pattern into the format's exact-width storage word.

Instances For
    @[inline]

    Exponent all-ones as storage word.

    Instances For
      @[inline]

      Fraction mask as storage word.

      Instances For
        @[inline]

        Shifted exponent mask as storage word.

        Instances For
          @[inline]

          Sign-bit mask as storage word.

          Instances For
            @[simp]

            The exact-width sign mask decodes to its unique top-bit power of two.

            @[simp]

            The sign-bit mask is nonzero for every valid format descriptor.

            @[inline]

            Quiet-NaN bit as storage word.

            Instances For