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)
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.hppprovidesbounded::spsc::queue_t<T,N>wait_pop(stop_token)bounded::mpsc::queue_t<T,N>bounded::spmc::queue_t<T,N>bounded::mpmc::queue_t<T,N>bounded::ring::adaptor_t<Q,N,align>push/pop/data/releasebounded::ring::spsc_t<N,K>/mpsc_t<N,K>sigma::doorbell_th5::impl::staging_ring_t<NP,NC,N,K>Portability
All six Linux CI compilers verified clean (
-Wall, zero warnings):cache_line_size_vuseshardware_destructive_interference_sizewith GCC-only pragma to silence-Winterference-size__GCC_DESTRUCTIVE_SIZEabsent on these versions; fallback to64__GCC_DESTRUCTIVE_SIZEpresentMSVC (VS 2022) and Apple Clang (Xcode 16 / libc++) expected OK — both have the constant through their own STL paths.
Changes
h5cpp/H5Qall.hpp(file already created on staging, compile-verified)#include "H5Qall.hpp"toh5cpp/coreDepends on
#194 (C++20 requirement)