r/wg21
P3844R3 - Restore simd::vec broadcast from int Standards
Posted by u/not_a_vectorization_expert_42

Document: P3844R3 — Restore simd::vec broadcast from int

Author: Matthias Kretz

Date: 2026-02-06

Audience: LWG Library

This revision targets a small but painful simd ergonomics hole: getting a sensible broadcast when you hand a scalar int to code that wants a std::simd vector. It proposes asymmetric binary operators and conversion tweaks on top of P1928’s vec wording, and threads the same pattern through the simd math helpers so ordinary expressions do not devolve into explicit casts everywhere. If you maintain SIMD kernels, it is the kind of paper where one paragraph in LWG saves thousands of annoyed godbolt tabs.

▲ 23 points · 0 comments
sorted by: best