This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
4231.datapar::chunk<N>
should use simd-size-type
instead of size_t
Section: 29.10.3 [simd.syn], 29.10.8.12 [simd.creation] Status: WP Submitter: Matthias Kretz Opened: 2025-03-22 Last modified: 2025-06-23
Priority: Not Prioritized
View all issues with WP status.
Discussion:
All index values and simd widths in subclause "Data-parallel types" use the type simd-size-type
. Specifically, the NTTP of std::datapar::resize
uses simd-size-type
and std::datapar::chunk
is "implemented" using std::datapar::resize
.
chunk<N>
, N
is of type size_t
and needs to be converted to simd-size-type
in the effects clause where it is passed to resize. The NTTP of chunk should use simd-size-type
instead of size_t
.
[2025-06-13; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[Sofia 2025-06-21; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N5008.
Modify 29.10.3 [simd.syn], header <simd>
synopsis, as indicated:
namespace std::datapar { […] template<simd-size-typesize_t N, class T, class Abi> constexpr auto chunk(const basic_simd<T, Abi>& x) noexcept; template<simd-size-typesize_t N, size_t Bytes, class Abi> constexpr auto chunk(const basic_simd_mask<Bytes, Abi>& x) noexcept; […] }
Modify 29.10.8.12 [simd.creation] as indicated:
template<simd-size-typesize_t N, class T, class Abi> constexpr auto chunk(const basic_simd<T, Abi>& x) noexcept;-4- Effects: Equivalent to:
return chunk<resize_t<N, basic_simd<T, Abi>>>(x);
template<simd-size-typesize_t N, size_t Bytes, class Abi> constexpr auto chunk(const basic_simd_mask<Bytes, Abi>& x) noexcept;-5- Effects: Equivalent to:
return chunk<resize_t<N, basic_simd_mask<Bytes, Abi>>>(x);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4