Created on 2025-03-22.00:00:00 last changed 2 weeks ago
Proposed resolution:
This wording is relative to N5008.
Modify [simd.syn], header <simd> synopsis, as indicated:
namespace std::datapar { […] template<simd-size-typesize_tN, class T, class Abi> constexpr auto chunk(const basic_simd<T, Abi>& x) noexcept; template<simd-size-typesize_tN, size_t Bytes, class Abi> constexpr auto chunk(const basic_simd_mask<Bytes, Abi>& x) noexcept; […] }
Modify [simd.creation] as indicated:
template<simd-size-typesize_tN, 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_tN, 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);
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`.
For 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`.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-03-22 16:50:56 | admin | set | messages: + msg14700 |
2025-03-22 00:00:00 | admin | create |