TorchLean API

FloatLib.Floats.Formats.Posit.Configured.Backend.FixedWords.Byte.Raw

Raw UInt8 kernels for packed posits #

These entry points specialize the shared kernels to UInt8 inputs and outputs. Configured runtime wrappers use the generic range theorems from FixedWords.Kernels.

Addition and subtraction #

@[noinline]
def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.addRaw (format : Format) (width_le : format.bits 8) (left right : UInt8) (hleft : left.toNat < format.modulus) (hright : right.toNat < format.modulus) :

Raw UInt8 addition kernel.

Instances For
    @[noinline]
    def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.subRaw (format : Format) (width_le : format.bits 8) (left right : UInt8) (hleft : left.toNat < format.modulus) (hright : right.toNat < format.modulus) :

    Raw UInt8 subtraction kernel.

    Instances For

      Multiplication and division #

      @[noinline]
      def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.mulRaw (format : Format) (width_le : format.bits 8) (left right : UInt8) (hleft : left.toNat < format.modulus) (hright : right.toNat < format.modulus) :

      Raw UInt8 multiplication kernel.

      Instances For
        @[noinline]
        def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.divRaw (format : Format) (width_le : format.bits 8) (left right : UInt8) (hleft : left.toNat < format.modulus) (hright : right.toNat < format.modulus) :

        Raw UInt8 division kernel.

        Instances For

          Square root and fused multiply-add #

          @[always_inline]
          def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.sqrtRaw (format : Format) (width_le : format.bits 8) (value : UInt8) (hvalue : value.toNat < format.modulus) :

          Raw UInt8 square-root kernel.

          Inlining this wrapper exposes the format to the shared root-prefix kernel when the caller's format is known.

          Instances For
            @[noinline]
            def FloatLib.Floats.Formats.Posit.Configured.Backend.Byte.fmaRaw (format : Format) (width_le : format.bits 8) (left right addend : UInt8) (hleft : left.toNat < format.modulus) (hright : right.toNat < format.modulus) (haddend : addend.toNat < format.modulus) :

            Raw UInt8 fused multiply-add kernel.

            Instances For