From 416238b64c26899afa4da412cb6e1a1aa7f78136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 16 Dec 2024 23:43:55 +0000 Subject: [PATCH 1/2] P3222R0 Fix C++26 by adding transposed special cases for P2642 layouts --- source/numerics.tex | 27 +++++++++++++++++++++++++-- source/support.tex | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index f07eeb83de..375aa29cab 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -13066,6 +13066,14 @@ \item otherwise, \tcode{layout_left} if \tcode{Layout} is \tcode{layout_right}; \item +otherwise, \tcode{layout_right_padded} if \tcode{Layout} is\newline +\tcode{layout_left_padded} +for some \tcode{size_t} value \tcode{PaddingValue}; +\item +otherwise, \tcode{layout_left_padded} if \tcode{Layout} is\newline +\tcode{layout_right_padded} +for some \tcode{size_t} value \tcode{PaddingValue}; +\item otherwise, \tcode{layout_stride} if \tcode{Layout} is \tcode{layout_stride}; \item otherwise, @@ -13108,11 +13116,26 @@ a.accessor()) \end{codeblock} \item +otherwise, +\begin{codeblock} +R(a.data_handle(), ReturnMapping(@\exposid{transpose-extents}@(a.mapping().extents()), + a.mapping().stride(1)), a.accessor()) +\end{codeblock} +if \tcode{Layout} is \tcode{layout_left_padded} +for some \tcode{size_t} value \tcode{PaddingValue}; +\item +otherwise, +\begin{codeblock} +R(a.data_handle(), ReturnMapping(@\exposid{transpose-extents}@(a.mapping().extents()), + a.stride(0)), a.accessor()) +\end{codeblock} +if \tcode{Layout} is \tcode{layout_right_padded} +for some \tcode{size_t} value \tcode{PaddingValue}; +\item otherwise, if \tcode{Layout} is \tcode{layout_stride}, \begin{codeblock} R(a.data_handle(), ReturnMapping(@\exposid{transpose-extents}@(a.mapping().extents()), - array{a.mapping().stride(1), a.mapping().stride(0)}), - a.accessor()) + array{a.mapping().stride(1), a.mapping().stride(0)}), a.accessor()) \end{codeblock} \item otherwise, if \tcode{Layout} is a specialization of \tcode{layout_transpose}, diff --git a/source/support.tex b/source/support.tex index ca0f9923da..bc3e79d0a6 100644 --- a/source/support.tex +++ b/source/support.tex @@ -710,7 +710,7 @@ #define @\defnlibxname{cpp_lib_jthread}@ 201911L // also in \libheader{stop_token}, \libheader{thread} #define @\defnlibxname{cpp_lib_latch}@ 201907L // also in \libheader{latch} #define @\defnlibxname{cpp_lib_launder}@ 201606L // freestanding, also in \libheader{new} -#define @\defnlibxname{cpp_lib_linalg}@ 202311L // also in \libheader{linalg} +#define @\defnlibxname{cpp_lib_linalg}@ 202411L // also in \libheader{linalg} #define @\defnlibxname{cpp_lib_list_remove_return_type}@ 201806L // also in \libheader{forward_list}, \libheader{list} #define @\defnlibxname{cpp_lib_logical_traits}@ 201510L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_make_from_tuple}@ 201606L // freestanding, also in \libheader{tuple} From b37622d14a65e719f2eeec748c1857ac299211e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 17 Dec 2024 12:23:34 +0000 Subject: [PATCH 2/2] [linalg.transp.transposed] Add missing "a.mapping()". It seems to have been omitted by oversight, but is clearly intended. --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 375aa29cab..d180b985ce 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -13127,7 +13127,7 @@ otherwise, \begin{codeblock} R(a.data_handle(), ReturnMapping(@\exposid{transpose-extents}@(a.mapping().extents()), - a.stride(0)), a.accessor()) + a.mapping().stride(0)), a.accessor()) \end{codeblock} if \tcode{Layout} is \tcode{layout_right_padded} for some \tcode{size_t} value \tcode{PaddingValue};