P3985R0 — Concepts for std::simd
(1 items)
LEWG, LWG
This paper proposes adding 10 public concepts to the std::simd namespace to enable clear template constraints for SIMD programming. The concepts are organized into three categories: type detection (vec_type, mask_type, vec_or_mask_type), element type refinements (vec_integral, vec_signed_integral, vec_unsigned_integral, vec_floating_point, vec_complex, vec_arithmetic), and element type matching (vec_of). These concepts extend the standard's scalar concept vocabulary to SIMD types and complement the existing exposition-only concepts in the C++26 working draft.
-
§3.2 Naming: vec_* vs simd_* — Paper states the primary type alias is std::simd::vec
, but vec takes a size parameter N, not an ABI tag. The ABI-parameterized template is basic_vec ; the convenience alias is vec . The paper's own §1.1 uses basic_vec correctly. Should read either vec or basic_vec depending on intent. [1] [1]
References — Anthropic Citations API
[1]
chars 6199–6334
"Since the primary type alias is std::simd::vec, a concept like vec_integral naturally reads as "a vec with integral elements." "
"Since the primary type alias is std::simd::vec
Summary: Proposes a set of named concepts (e.g., vec_integral, vec_floating_point) for constraining std::simd::vec and std::simd::basic_vec template parameters, aiming to simplify generic SIMD code and reduce reliance on ad-hoc SFINAE or requires-clauses.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.