Skip to content

core, unify and extend core I/O, types, and container mappers #274

@steven-varga

Description

@steven-varga

Summary

Largest commit in the refactor — unifies and extends the core I/O layer across reads, writes, attribute paths, type meta, and per-container mappers. ~32 headers touched; +4500 / -400 lines.

Areas

Type meta + classification (H5Tmeta.hpp, H5Tall.hpp, H5Tsparse.hpp)

  • Storage-representation enum renames for a cleaner taxonomy (array_element, array_dataset, etc.).
  • Multi-dim C-array partial-ordering ambiguity fixed at the H5Tmeta.hpp rank-1 specialization (!std::is_array_v<T> SFINAE clause).
  • H5R_ref_t reference rule-of-five RAII (HDF5 ≥ 1.12 uses H5Rdestroy/H5Rcopy; old-API path preserved).
  • New sparse trait surface (CSC layout) at H5Tsparse.hpp.

Read / write paths (H5Dread.hpp, H5Dwrite.hpp, H5Aread.hpp, H5Awrite.hpp)

  • Sparse dispatch: h5::write / h5::read overloads for Armadillo / Eigen sparse, gated on is_sparse_v<T>.
  • Fixed-length string attribute detection in H5Aread: probes the on-disk type via H5Aget_type + H5Tis_variable_str; HDF5 has no fixed↔VLEN conversion path so the dispatch must branch.
  • VLEN partial-IO restored — select_hyperslab was lost in an earlier storage refactor.

Container mappers (H5Marma.hpp, H5Meigen.hpp, H5Mblaze.hpp, H5Mblitz.hpp, H5Mdlib.hpp, H5Mstl.hpp, H5Mublas.hpp, H5Mvalarray.hpp, H5Mxtensor.hpp, H5Mmdspan.hpp, H5Mmemory.hpp, H5Mmemory_io.hpp)

  • Sparse specializations for arma::SpMat/SpRow/SpCol and Eigen::SparseMatrix/SparseVector (ColMajor only; RowMajor static-asserts out).
  • C++23 std::mdspan mapper added (gated on __cpp_lib_mdspan >= 202207L).

Group / property / cout / misc (H5Gcreate.hpp, H5Gopen.hpp, H5Pall.hpp, H5cout.hpp, H5Ialgorithm.hpp, H5Eall.hpp, H5Dappend.hpp, H5misc.hpp, H5Uall.hpp, H5config.hpp)

  • Generic handle printer H5cout.hpp with ADL-friendly operator<< in h5::impl::detail and per-handle deep specializations.
  • Group create/open helpers fleshed out and consistent with the surrounding handle types.

Sparse dispatch entry point (H5Dsparse.hpp)

  • New h5::write / h5::read returning h5::gr_t for sparse types; on-disk layout is the CSC group convention (interop with scipy / Julia HDF5.jl / 10x Genomics).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions