Skip to content

[#16]:svarga:refactor, std::tuple type-axis (throughput<Tuple>) and retire bench::types<>#17

Merged
steven-varga merged 3 commits into
stagingfrom
16-tuple-typeaxis
Jun 17, 2026
Merged

[#16]:svarga:refactor, std::tuple type-axis (throughput<Tuple>) and retire bench::types<>#17
steven-varga merged 3 commits into
stagingfrom
16-tuple-typeaxis

Conversation

@steven-varga

Copy link
Copy Markdown
Contributor

Closes #16.

The type axis is now a plain std::tuple passed as an explicit template argument; the bench::types<Ts...> marker is retired (redundant — static_for already iterates a std::tuple).

Engine

  • New template<class Tuple, class... args_t> requires impl::is_tuple<Tuple> void throughput(args_t...) — called bench::throughput<std::tuple<A,B,C>>(...). Same fold/timing/stats/rows as before (one row per (type,x), "<name>/<typelabel>").
  • Disambiguation: Tuple is the leading explicit template arg, constrained by a new impl::is_tuple concept (is_specialization_of + remove_cvref). It's never deduced, so a plain throughput(name{...}, ...) falls through to the scalar overload; throughput<std::tuple<...>>(...) selects this one. Both verified.
  • Deleted struct types and the old marker overload.

Migrated call sites (grep -rn 'bench::types' → empty)

test/type_dispatch.cpp, examples/type_dispatch.cpp, examples/heatmap.cpp, README.md, and examples/memcpy_bandwidth.cpp (rewritten to the designed typed-tuple form: std::tuple<uint8_t,uint16_t,uint32_t,uint64_t> with typed static buffers and a [&]<class T> body).

Verification

Build green (-DBENCH_BUILD_EXAMPLES=ON); ctest 5/5; memcpy_bandwidth/type_dispatch/heatmap examples all run.

Base: staging.

@steven-varga steven-varga merged commit 523d9ab into staging Jun 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant