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

stillwater-sc / universal / 25377027626
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/issue-1002-ereal-highprec-constants
DEFAULT BRANCH: master
Ran 05 May 2026 01:09PM UTC
Jobs 1
Files 648
Run time 1min
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

05 May 2026 12:42PM UTC coverage: 83.974% (-0.003%) from 83.977%
25377027626

push

github

web-flow
feat: partial constexpr support for accessor subset(zfpblock) (#814)

* feat(zfpblock): partial constexpr support for accessor subset

Promotes zfpblock's static accessors and the compute_limits helper to
constexpr -- the achievable subset that doesn't require rewriting the
ZFP transform codec.  Part of Epic #723.

Scope decision
--------------

zfpblock has three layers:
  1. Static block-buffer container with simple integer accessors
     (compressed_bits, compressed_bytes, compression_ratio, data, mode,
     param, block_size, dim).  THIS PR.
  2. ZFP transform codec (zfp_codec.hpp, 564 lines): uses std::frexp /
     std::ldexp / std::memset and a uint8_t bit-stream packer
     (zfp_bitstream).  DEFERRED.
  3. zfparray multi-block container (zfparray_impl.hpp, 326 lines):
     uses std::vector<uint8_t> backing store and std::memcpy /
     std::memset.  DEFERRED.

Layers 2 and 3 are non-trivial constexpr lifts that warrant their own
follow-up PRs.  This PR delivers the immediately-achievable subset and
locks the contract in via static_assert.

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

include/sw/universal/number/zfpblock/zfpblock_impl.hpp:
  * Marked all simple accessors constexpr + noexcept:
    compressed_bits, compressed_bytes, compression_ratio, data, mode,
    param, block_size, dim.
  * Marked compute_limits (private static) constexpr -- it's pure
    integer arithmetic over a switch on zfp_mode enum, so the
    promotion is straightforward.
  * compress / decompress / compress_fixed_* deliberately NOT promoted;
    added comment pointing to the codec deferral.

static/block/zfpblock/api/constexpr.cpp (new):
  * Static accessor verification: BLOCK_SIZE, MAX_BYTES, block_size,
    dim for zfpblock<float, 1>, zfpblock<double, 2>, zfpblock<double, 3>
    -- 4 / 16 / 64 element blocks respectively.
  * compressed_bits / compressed_bytes / compression_ratio /
    data / mode / param exercised via constexpr lambdas with
    value-initialized blocks.  compression_r... (continued)

6 of 6 new or added lines in 1 file covered. (100.0%)

10 existing lines in 1 file now uncovered.

45842 of 54591 relevant lines covered (83.97%)

6484147.51 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 25377027626.1 05 May 2026 01:09PM UTC 648
83.97
GitHub Action Run
Source Files on build 25377027626
  • Tree
  • List 648
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25377027626
  • f3f7664f on github
  • Prev Build on main (#25355698320)
  • Next Build on main (#25386566044)
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