• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 25347143147 / 1
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 04 May 2026 10:59PM UTC
Files 648
Run time 18s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2026 10:31PM UTC coverage: 84.061% (-0.05%) from 84.112%
25347143147.1

push

github

web-flow
feat(e8m0): full constexpr support across all operators (#810)

* feat(e8m0): full constexpr support across all operators

Promotes e8m0 (8-bit exponent-only OCP scaling factor used by mxblock /
mxfloat / nvblock) to fully constexpr across construction, assignment,
comparison, and conversion.  e8m0 has no fraction (no rounding logic
beyond round-to-nearest-power-of-2 on float input) and no arithmetic
operators (would be log-domain), so the surface is contained.  Part of
Epic #723.

What changed
------------

include/sw/universal/number/e8m0/e8m0_impl.hpp:
  * Native-type ctors and assignment operators (float, double, int,
    unsigned) marked constexpr.
  * Conversion operators (operator float / double / int) marked
    constexpr.
  * Increment / decrement (++ --) marked constexpr (saturating at
    encoding 254 / 0).
  * Comparison operators (== != < <= > >=) marked constexpr;
    NaN-aware semantics preserved (NaN comparisons return false).

  * to_float() rewritten constexpr-safe via direct IEEE 754 bit
    construction (matches std::ldexp(1.0f, encoding - 127) bit-exactly):
      - encoding 1..254 -> normal float, exp_field = encoding (bias 127
        matches), mantissa = 0
      - encoding 0      -> 2^-127, subnormal float with mantissa MSB set
        (bit pattern 0x00400000)
      - encoding 255    -> NaN via numeric_limits<float>::quiet_NaN()
    Runtime path retains std::ldexp via std::is_constant_evaluated()
    dispatch for performance.

  * from_float() rewritten constexpr-safe:
      - Replaced std::isinf with numeric_limits<float>::max() bracket
      - Replaced std::log2 + std::round with bit-level extraction:
        rawExp gives the biased exponent (which IS the e8m0 encoding,
        modulo rounding), rawFrac >= (sqrt(2) - 1) * 2^23 ~= 3474676
        triggers round-up to the next power of 2.
      - Subnormal floats (rawExp == 0) coarsely clamped to encoding 0
        in the constexpr path; runtime retains exact log2-based
        ... (continued)

45814 of 54501 relevant lines covered (84.06%)

6492050.03 hits per line

Source Files on job 25347143147.1
  • Tree
  • List 648
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25347143147
  • 897c0a95 on github
  • Prev Job for on main (#25330596259.1)
  • Next Job for on main (#25352381793.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc