[PATCH v1 3/4] libstdc++: Implement submdspan_mapping_result. [PR110352]
Tomasz Kaminski
tkaminsk@redhat.com
Fri Oct 3 10:29:33 GMT 2025
On Thu, Oct 2, 2025 at 11:32 AM Luc Grosheintz <luc.grosheintz@gmail.com>
wrote:
> Implement the class submdspan_mapping_result and add it to the std
> module.
>
> PR libstdc++/110352
>
> libstdc++-v3/ChangeLog:
>
> * include/std/mdspan (submdspan_mapping_result): New class.
> * src/c++23/std.cc.in (submdspan_mapping_result): Add.
>
> Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
> ---
>
LGTM.
> libstdc++-v3/include/std/mdspan | 7 +++++++
> libstdc++-v3/src/c++23/std.cc.in | 3 ++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/std/mdspan
> b/libstdc++-v3/include/std/mdspan
> index 00bb9716a9d..cef6d625982 100644
> --- a/libstdc++-v3/include/std/mdspan
> +++ b/libstdc++-v3/include/std/mdspan
> @@ -361,6 +361,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> [[no_unique_address]] extent_type extent{};
> [[no_unique_address]] stride_type stride{};
> };
> +
> + template<typename _Mapping>
> + struct submdspan_mapping_result
> + {
> + [[no_unique_address]] _Mapping mapping = _Mapping();
> + size_t offset{};
> + };
> #endif
>
> template<typename _IndexType, size_t... _Extents>
> diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/
> std.cc.in
> index bfccf3cec95..9cf5fa7dcb6 100644
> --- a/libstdc++-v3/src/c++23/std.cc.in
> +++ b/libstdc++-v3/src/c++23/std.cc.in
> @@ -1875,8 +1875,9 @@ export namespace std
> using strided_slice;
> using full_extent_t;
> using full_extent;
> + using submdspan_mapping_result;
> #endif
> - // FIXME submdspan_mapping_result, submdspan_extents, mdsubspan
> + // FIXME submdspan_extents, mdsubspan
> }
> #endif
>
> --
> 2.50.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20251003/8b09b6ef/attachment.htm>
More information about the Libstdc++
mailing list