Files
hdf5/bin
M. Scot Breitenfeld 305f1df3bf Use vendored Ryu for shortest-round-trip filter-param formatting
H5Z__format_double_canonical() previously found the shortest round-tripping
%.*g precision by brute-force search, verified with an strtod() readback.
On HDFGroup/hdf5#6153 we agreed a well-tested library was the safer choice
for a conversion that lands in the on-disk format, and settled on Ryu.

Vendors the double-to-shortest-decimal subset of Ryu (src/ryu), following
the same pattern as the existing tomlc17 vendoring: pristine upstream
sources pinned to a commit, per-file SHA-256s, an HDF5-authored
h5_ryu_prefix.h renaming its globals via force-include, and matching CMake
treatment for symbol visibility and warnings.

Ryu emits unconditional scientific notation with no padding (3.0 -> "3E0"),
so H5Z__format_double_canonical() takes its digit string and decimal
exponent apart and lays them out %g-style -- fixed-point in the human-scale
range, scientific outside it -- which keeps the canonical form unchanged
(rate = 3.5, not rate = 3.5E0) and needs no strtod() round-trip check: the
re-layout only moves the decimal point. Ryu also writes ASCII digits
directly rather than through locale-sensitive snprintf(), so the
localeconv() decimal-separator fixup the old implementation needed is gone.

Updated the get_config plugin contract, the h5repack/h5tools rationale
comments, and tooling (clang-format, codespell, format_source) that
exempted src/tomlc17 to exempt src/ryu the same way.

Verified with a 2M-sample bit-pattern sweep plus all 2098 powers of two
round-tripping bit-exact through the new formatter, and the full tfilter2
canonicalization suite passing unchanged.
2026-09-19 18:11:31 -05:00
..
2024-10-18 21:13:04 -07:00
2024-10-18 21:13:04 -07:00
2024-10-18 21:13:04 -07:00
2024-10-18 21:13:04 -07:00
2026-01-21 23:02:49 -06:00
2026-01-21 23:02:49 -06:00
2024-10-18 21:13:04 -07:00
2024-10-18 21:13:04 -07:00

Scripts in bin and their purpose

Program Purpose
checkapi Checks if public API calls are used in internal functions
chkcopyright Checks if files have appropriate copyright statements
debug-ohdr Examines debug output from H5O_open/close to look for open objects
format_source Runs clang-format over the source files, applying our rules
genparser Creates the flex/bison-based parser files in the high-level library
h5cc.in Input file from which h5cc is created
h5redeploy.in Input file from which h5redeploy is created
make_err Generates the H5E header files
make_vers Generates H5version.h
make_overflow Generates H5overflow.h
output_filter Used in the tools test code to strip extraneous output before we diff files
runbkprog Used by CMake to run test programs in the background
trace Updates H5ARG_TRACE macros in H5ES_insert() calls
warnhist Generates compiler warning statistics for gcc/clang when fed output of make

TODO

  • chkcopyright is currently semi-broken as it doesn't handle the full variety of copyright headers we need. We're leaving it in place, though, in the hopes that someone will update it in the future.
  • Extending warnhist to better understand the output of additional compilers/languages would be nice.