Skip to content

feature, add H5Qall.hpp amalgamated bounded queue and ring arena (MIT) #195

@steven-varga

Description

@steven-varga

Motivation

The scatter/gather staging layer (#196) and the threaded pipeline (#197) both need bounded lock-free queues and a byte-arena ring buffer. The primitives exist in sigma/queue.hpp + sigma/ring.hpp (Varga Labs). This issue re-licenses those files under MIT and ships them as a single self-contained header in h5cpp, eliminating any external dependency.

What H5Qall.hpp provides

Type Description
bounded::spsc::queue_t<T,N> SPSC, no CAS on either side, wait_pop(stop_token)
bounded::mpsc::queue_t<T,N> MPSC, Vyukov bounded, CAS on head
bounded::spmc::queue_t<T,N> SPMC, Vyukov bounded, CAS on tail
bounded::mpmc::queue_t<T,N> MPMC, full Vyukov
bounded::ring::adaptor_t<Q,N,align> Byte-arena ring: push/pop/data/release
bounded::ring::spsc_t<N,K> / mpsc_t<N,K> Typed ring aliases
sigma::doorbell_t Standalone atomic notify primitive
h5::impl::staging_ring_t<NP,NC,N,K> Topology selector: SPSC when NP=1∧NC=1, MPSC otherwise

Portability

All six Linux CI compilers verified clean (-Wall, zero warnings):

Compiler Result
gcc-13, gcc-14 OK — cache_line_size_v uses hardware_destructive_interference_size with GCC-only pragma to silence -Winterference-size
clang-17, clang-18 OK — __GCC_DESTRUCTIVE_SIZE absent on these versions; fallback to 64
clang-19, clang-20 OK — __GCC_DESTRUCTIVE_SIZE present

MSVC (VS 2022) and Apple Clang (Xcode 16 / libc++) expected OK — both have the constant through their own STL paths.

Changes

  • Add h5cpp/H5Qall.hpp (file already created on staging, compile-verified)
  • Add #include "H5Qall.hpp" to h5cpp/core

Depends on

#194 (C++20 requirement)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality

    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