Re: [PATCH v1 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-10 Thread Luc Grosheintz
On 4/9/25 9:23 AM, Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains partial progress towards PR107761. If an extent changes its type, there's a precondition in the standard, that the value is representable in the target integer type. This commit u

[PATCH v1 4/4] libstdc++: Add tests for std::extents.

2025-04-10 Thread Luc Grosheintz
test. * testsuite/23_containers/mdspan/extents/static_extent.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/assign_copy.cc | 26 ++ .../mdspan/extents/assign_copy_01_neg.cc | 15 .../mdspan/extents/class_traits.cc

[PATCH v1 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-09 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 4 ++ libstdc++-v3/include/std/mdspan

[PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-09 Thread Luc Grosheintz
Each commit was tested with 'make check-target-libstdc++-v3' on x86_64. Thank you! Luc Grosheintz (4): libstdc++: Setup internal FTM for mdspan. libstdc++: Add header mdspan to the build-system. libstdc++: Implement std::extents [PR107761]. libstdc++: Add tests for std::extents.

[PATCH v1 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-09 Thread Luc Grosheintz
PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 400 +++ libstdc++-v3/src/c++

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Luc Grosheintz
On 4/17/25 2:31 PM, Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 2:21 PM Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:44 PM Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz wrote: This implements std::extents from

[PATCH v4 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-18 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 9 + 2 files changed, 18 insertions(+) diff --git a/libstdc++-v3

[PATCH v4 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-18 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 1 + libstdc++-v3/include/std/mdspan

[PATCH v4 0/4] Implement extents from the mdspan header.

2025-04-18 Thread Luc Grosheintz
std::extents. Luc Grosheintz (4): libstdc++: Setup internal FTM for mdspan. libstdc++: Add header mdspan to the build-system. libstdc++: Implement std::extents [PR107761]. libstdc++: Add tests for std::extents. libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include

[PATCH v4 4/4] libstdc++: Add tests for std::extents.

2025-04-18 Thread Luc Grosheintz
test. * testsuite/23_containers/mdspan/extents/misc.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/class_mandates_neg.cc | 8 + .../23_containers/mdspan/extents/ctor_copy.cc | 82 +++ .../23_containers/mdspan/extents/ctor_ints.cc | 62 + .../mdspan/ex

[PATCH v4 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-18 Thread Luc Grosheintz
* include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 249 +++ libstdc++-v3/src/c++23/std.cc.in | 6 +- 2 files changed, 254 insertions(+

Re: [PATCH v2 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-15 Thread Luc Grosheintz
Thank you! I left two comments. Everything not commented on, I'll just incorporate into the next iteration. On 4/15/25 11:18 AM, Tomasz Kaminski wrote: On Tue, Apr 15, 2025 at 10:43 AM Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains pa

Re: [PATCH v4 0/4] Implement extents from the mdspan header.

2025-04-18 Thread Luc Grosheintz
venient to the reviewers and maintainers. On 4/18/25 1:29 PM, Luc Grosheintz wrote: This is the fourth interation and replaces: https://gcc.gnu.org/pipermail/libstdc++/2025-April/061046.html Changes since v3: * Use `_S_` prefix for static member functions. * Use consteval to reduce

Re: [PATCH v5 02/10] libstdc++: Add header mdspan to the build-system.

2025-04-30 Thread Luc Grosheintz
On 4/29/25 3:11 PM, Jonathan Wakely wrote: On Tue, 29 Apr 2025 at 13:59, Luc Grosheintz wrote: Creates a nearly empty header mdspan and adds it to the build-system and Doxygen config file. libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in: Add . * include/Makefile.am

Re: [PATCH v5 03/10] libstdc++: Implement std::extents [PR107761].

2025-04-30 Thread Luc Grosheintz
On 4/30/25 4:37 AM, Tomasz Kaminski wrote: On Tue, Apr 29, 2025 at 11:52 PM Jonathan Wakely wrote: On Tue, 29 Apr 2025 at 14:55, Tomasz Kaminski wrote: On Tue, Apr 29, 2025 at 2:55 PM Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains partial

[PATCH v6 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-30 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 9 + 2 files changed, 18 insertions(+) diff --git a/libstdc++-v3

[PATCH v6 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-30 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 1 + libstdc++-v3/include/std/mdspan

[PATCH v6 4/4] libstdc++: Add tests for std::extents.

2025-04-30 Thread Luc Grosheintz
test. * testsuite/23_containers/mdspan/extents/misc.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/class_mandates_neg.cc | 8 + .../23_containers/mdspan/extents/ctor_copy.cc | 82 +++ .../23_containers/mdspan/extents/ctor_ints.cc | 62 + .../mdspan/ex

[PATCH v6 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-30 Thread Luc Grosheintz
* include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 261 +++ libstdc++-v3/src/c++23/std.cc.in | 9 +- 2 files changed, 269 insertions(+

[PATCH v6 0/4] Implement extents from the mdspan header.

2025-04-30 Thread Luc Grosheintz
This is the sixth interation and replaces: https://gcc.gnu.org/pipermail/libstdc++/2025-April/061190.html Changes since v5: * Removed superfluous braces. * Fixed std.cc.in * Fixed Copyright statement. Any layout related code has been removed from this patch series. Luc Grosheintz (4): libstdc

Re: [PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-17 Thread Luc Grosheintz
The `v1` in the subject line is a copy-paste error while creating the subject line. This is the preceding patch series: https://gcc.gnu.org/pipermail/libstdc++/2025-April/060988.html On 4/17/25 1:16 PM, Luc Grosheintz wrote: The following changes were made since v2: * Implement the missing

[PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-17 Thread Luc Grosheintz
two patches of the series haven't changed since v2. Luc Grosheintz (4): libstdc++: Setup internal FTM for mdspan. libstdc++: Add header mdspan to the build-system. libstdc++: Implement std::extents [PR107761]. libstdc++: Add tests for std::extents. libstdc++-v3/doc/doxygen/user.c

[PATCH v3 4/4] libstdc++: Add tests for std::extents.

2025-04-17 Thread Luc Grosheintz
test. * testsuite/23_containers/mdspan/extents/ctor_ints.cc: New test. * testsuite/23_containers/mdspan/extents/ctor_shape.cc: New test. * testsuite/23_containers/mdspan/extents/custom_integer.cc: New test. * testsuite/23_containers/mdspan/extents/misc.cc: New test. Signed-off-by

[PATCH v3 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-17 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 1 + libstdc++-v3/include/std/mdspan

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Luc Grosheintz
Thank you for another excellent review! On 4/17/25 1:44 PM, Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains partial progress towards PR107761. If an extent changes its type

[PATCH v3 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-17 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 9 + 2 files changed, 18 insertions(+) diff --git a/libstdc++-v3

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-06 Thread Luc Grosheintz
left_base, and they will be inherited, as only copy/move constructors are shadowed. On Tue, May 6, 2025 at 9:11 AM Tomasz Kaminski wrote: On Mon, May 5, 2025 at 9:20 PM Luc Grosheintz wrote: On 5/5/25 9:44 AM, Tomasz Kaminski wrote: On Sat, May 3, 2025 at 2:39 PM Luc Grosheintz < lu

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-05 Thread Luc Grosheintz
On 5/5/25 9:44 AM, Tomasz Kaminski wrote: On Sat, May 3, 2025 at 2:39 PM Luc Grosheintz wrote: On 4/30/25 7:13 AM, Tomasz Kaminski wrote: Hi, As we will be landing patches for extends, this will become a separate patch series. I would prefer, if you could commit per layout, and start

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-06 Thread Luc Grosheintz
On 5/6/25 1:56 PM, Tomasz Kaminski wrote: On Tue, May 6, 2025 at 1:39 PM Luc Grosheintz wrote: On 5/6/25 11:28 AM, Tomasz Kaminski wrote: For better reference, here is illustration of the design I was thinking about: https://godbolt.org/z/7aTcM8fz4 I would also consider having

[PATCH v2 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-15 Thread Luc Grosheintz
PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 304 +++ libstdc++-v3/src/c++

Re: [PATCH v1 4/4] libstdc++: Add tests for std::extents.

2025-04-10 Thread Luc Grosheintz
diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/extents/assign_copy_01_neg.cc b/libstdc++-v3/testsuite/23_containers/mdspan/extents/assign_copy_01_neg.cc new file mode 100644 index 000..8a514f2207b --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/mdspan/extents/assign_co

[PATCH v1 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-10 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 10 ++ 2 files changed, 19 insertions(+) diff --git a/libstdc++-v3

[PATCH v2 4/4] libstdc++: Add tests for std::extents.

2025-04-15 Thread Luc Grosheintz
suite/23_containers/mdspan/extents/extent.cc: New test. * testsuite/23_containers/mdspan/extents/ops_eq.cc: New test. Signed-off-by: Luc Grosheintz --- .../23_containers/mdspan/extents/assign.cc| 29 ++ .../mdspan/extents/class_properties.cc| 62 + .../23_containers/m

[PATCH v2 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-15 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 9 + 2 files changed, 18 insertions(+) diff --git a/libstdc++-v3

Re: [PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-15 Thread Luc Grosheintz
The second iteration of this patch series is available here: https://gcc.gnu.org/pipermail/libstdc++/2025-April/060988.html Thank you for the reviews. On 4/9/25 9:23 AM, Luc Grosheintz wrote: Hi, This is a patch series that implements std::extents from . I've never contributed to G

[PATCH v2 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-15 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 1 + libstdc++-v3/include/std/mdspan

[PATCH v2 0/4] Implement extents from the mdspan header.

2025-04-15 Thread Luc Grosheintz
c++-v3`. Thank you Tomasz Kaminski and Jonathan Wakely for your helpful review! Luc Grosheintz (4): libstdc++: Setup internal FTM for mdspan. libstdc++: Add header mdspan to the build-system. libstdc++: Implement std::extents [PR107761]. libstdc++: Add tests for std::extents. libst

[PATCH v5 01/10] libstdc++: Setup internal FTM for mdspan.

2025-04-29 Thread Luc Grosheintz
feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/bits/version.def | 9 + libstdc++-v3/include/bits/version.h | 9 + 2 files changed, 18 insertions(+) diff --git a/libstdc++-v3

[PATCH v5 07/10] libstdc++: Implement layout_right from mdspan.

2025-04-29 Thread Luc Grosheintz
Implement the parts of layout_left that depend on layout_right; and the parts of layout_right that don't depend on layout_stride. libstdc++/ChangeLog: * include/std/mdspan (layout_right): New class. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan

[PATCH v5 00/10] Implement extents and layouts from the mdspan header.

2025-04-29 Thread Luc Grosheintz
nted a slightly different check, that satisfies the layout mapping requirements, but also return true for the example provided above. [0]: https://eel.is/c++draft/mdspan.layout#stride.obs-5.2 Thank you Tomasz for the excellent review of v4. Luc Grosheintz (10): libstdc++: Setup internal

[PATCH v5 03/10] libstdc++: Implement std::extents [PR107761].

2025-04-29 Thread Luc Grosheintz
* include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 262 +++ libstdc++-v3/src/c++23/std.cc.in | 6 +- 2 files changed, 267 insertions(+

[PATCH v5 08/10] libstdc++: Add tests for layout_right.

2025-04-29 Thread Luc Grosheintz
layout_right and the interaction with layout_left. * testsuite/23_containers/mdspan/layouts/mapping.cc: ditto. Signed-off-by: Luc Grosheintz --- .../mdspan/layouts/class_mandate_neg.cc | 1 + .../23_containers/mdspan/layouts/ctors.cc | 90

[PATCH v5 04/10] libstdc++: Add tests for std::extents.

2025-04-29 Thread Luc Grosheintz
test. * testsuite/23_containers/mdspan/extents/misc.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/class_mandates_neg.cc | 8 + .../23_containers/mdspan/extents/ctor_copy.cc | 82 +++ .../23_containers/mdspan/extents/ctor_ints.cc | 62 + .../mdspan/ex

[PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-04-29 Thread Luc Grosheintz
Implements the parts of layout_left that don't depend on any of the other layouts. libstdc++/ChangeLog: * include/std/mdspan (layout_left): New class. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 179 1 file changed

[PATCH v5 09/10] libstdc++: Implement layout_stride from mdspan.

2025-04-29 Thread Luc Grosheintz
Implements the remaining parts of layout_left and layout_right; and all of layout_stride. libstdc++/ChangeLog: * include/std/mdspan(layout_stride): New class. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 227 1 file changed, 227

[PATCH v5 06/10] libstdc++: Add tests for layout_left.

2025-04-29 Thread Luc Grosheintz
. * testsuite/23_containers/mdspan/layouts/ctors.cc: New test. * testsuite/23_containers/mdspan/layouts/mapping.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/layouts/class_mandate_neg.cc | 21 + .../23_containers/mdspan/layouts/ctors.cc | 132 +++ .../23_containers

[PATCH v5 10/10] libstdc++: Add tests for layout_stride.

2025-04-29 Thread Luc Grosheintz
/ctors.cc: Add test for layout_stride and the interaction with other layouts. * testsuite/23_containers/mdspan/layouts/mapping.cc: Ditto. * testsuite/23_containers/mdspan/layouts/stride.cc: New test. Signed-off-by: Luc Grosheintz --- .../mdspan/layouts/class_mandate_neg.cc

[PATCH v5 02/10] libstdc++: Add header mdspan to the build-system.

2025-04-29 Thread Luc Grosheintz
. * include/std/mdspan: New file. Signed-off-by: Luc Grosheintz --- libstdc++-v3/doc/doxygen/user.cfg.in | 1 + libstdc++-v3/include/Makefile.am | 1 + libstdc++-v3/include/Makefile.in | 1 + libstdc++-v3/include/precompiled/stdc++.h | 1 + libstdc++-v3/include/std/mdspan

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-03 Thread Luc Grosheintz
d to change the implementation. Maybe you could explain a little what and why you don't like the admittedly very brute-force implementation. On Tue, Apr 29, 2025 at 2:56 PM Luc Grosheintz wrote: Implements the parts of layout_left that don't depend on any of the other layouts. libstdc+

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-03 Thread Luc Grosheintz
ric implementation that you can use in yours. Please also include a comment explaining that we are deviating from standard text here. On Tue, Apr 29, 2025 at 2:56 PM Luc Grosheintz wrote: Implements the parts of layout_left that don't depend on any of the other layouts. libstdc+

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-03 Thread Luc Grosheintz
layout::mapping> The last one is a generic implementation that you can use in yours. Please also include a comment explaining that we are deviating from standard text here. On Tue, Apr 29, 2025 at 2:56 PM Luc Grosheintz wrote: Implements the parts of layout_left that don't depend on any

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-03 Thread Luc Grosheintz
Rank1_mapping_base> const&); }; }; template requires sizeof..(_Ext) > = 2 struct layout::mapping> The last one is a generic implementation that you can use in yours. Please also include a comment explaining that we are deviating from standard text here. On Tue, Apr 29, 2025 at 2:56 PM Luc Groshe

[PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-18 Thread Luc Grosheintz
* include/std/mdspan (extents): New class. * src/c++23/std.cc.in: Add 'using std::extents'. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 249 +++ libstdc++-v3/src/c++23/std.cc.in | 6 +- 2 files changed, 254 insertions(+

Re: [PATCH v4 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-18 Thread Luc Grosheintz
On 4/18/25 2:00 PM, Tomasz Kaminski wrote: On Fri, Apr 18, 2025 at 1:43 PM Luc Grosheintz <mailto:[email protected]>> wrote: This implements std::extents from according to N4950 and contains partial progress towards PR107761. If an extent changes its type,

Re: [PATCH v4 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-19 Thread Luc Grosheintz
On 4/18/25 7:47 PM, Luc Grosheintz wrote: On 4/18/25 2:00 PM, Tomasz Kaminski wrote: On Fri, Apr 18, 2025 at 1:43 PM Luc Grosheintz mailto:[email protected]>> wrote:     This implements std::extents from according to N4950 and     contains partial progress towards PR

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-07 Thread Luc Grosheintz
On 5/6/25 2:47 PM, Tomasz Kaminski wrote: On Tue, May 6, 2025 at 1:39 PM Luc Grosheintz wrote: On 5/6/25 11:28 AM, Tomasz Kaminski wrote: For better reference, here is illustration of the design I was thinking about: https://godbolt.org/z/7aTcM8fz4 I would also consider having

[PATCH v1 0/3] Fix custom IndexType related bugs in mdspan.

2025-07-16 Thread Luc Grosheintz
); Which doesn't mention `std::move`. I've added std::move, since I believe that's the intended behaviour. [1]: https://eel.is/c++draft/mdspan.layout.left#obs-4 Luc Grosheintz (3): libstdc++: Refactor mdspan tests [PR121061] libstdc++: Fix constraint for custom integer

[PATCH v1 3/3] libstdc++: Fix forwarding of custom IndexType in mdspan [PR121061]

2025-07-16 Thread Luc Grosheintz
. * testsuite/23_containers/mdspan/mdspan.cc: Ditto. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 8 .../23_containers/mdspan/extents/custom_integer.cc| 3 +++ libstdc++-v3/testsuite/23_containers/mdspan/int_like.h| 7

[PATCH v1 1/3] libstdc++: Refactor mdspan tests [PR121061]

2025-07-16 Thread Luc Grosheintz
. * testsuite/23_containers/mdspan/extents/int_like.h: Rename (old name). * testsuite/23_containers/mdspan/int_like.h: Rename (new name). (ThrowingInt): Add. (NotIntLike): Add. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/custom_integer.cc | 98

[PATCH v1 2/3] libstdc++: Fix constraint for custom integer types in mdspan [PR121061]

2025-07-16 Thread Luc Grosheintz
/mdspan/int_like.h (MutatingInt): Add. * testsuite/23_containers/mdspan/layouts/mapping.cc: Add test for MutatingInt. * testsuite/23_containers/mdspan/layouts/stride.cc: Ditto. * testsuite/23_containers/mdspan/mdspan.cc: Ditto. Signed-off-by: Luc Grosheintz

Re: [PATCH v4 0/6] Implement mdspan.

2025-07-16 Thread Luc Grosheintz
On 7/15/25 13:43, Tomasz Kaminski wrote: On Tue, Jul 15, 2025 at 1:35 PM Jonathan Wakely wrote: OK here are the details for all of the failing tests ... std/containers/views/mdspan/aligned_accessor/access.pass.cpp std/containers/views/mdspan/aligned_accessor/ctor.conversion.from.default_a

Re: [PATCH v1 1/3] libstdc++: Implement is_sufficiently_aligned.

2025-07-16 Thread Luc Grosheintz
On 7/9/25 14:43, Jonathan Wakely wrote: On Thu, 3 Jul 2025 at 11:35, Luc Grosheintz wrote: This commit implements and tests the function is_sufficiently_aligned from P2897R7. libstdc++-v3/ChangeLog: * include/bits/align.h (is_sufficiently_aligned): New function

Re: [PATCH v4 1/1] libstdc++: Implement default_accessor from mdspan.

2025-06-27 Thread Luc Grosheintz
1:11 AM Tomasz Kaminski wrote: On Fri, Jun 27, 2025 at 11:06 AM Luc Grosheintz wrote: libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * testsuite/23_containers/mdspan/accessors/defaul

Re: [PATCH v5] libstdc++: Implement default_accessor from mdspan.

2025-06-27 Thread Luc Grosheintz
Sorry, I'll continue working another day. This commit is broken; please ignore. On 6/27/25 13:15, Luc Grosheintz wrote: libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * test

[PATCH v5] libstdc++: Implement default_accessor from mdspan.

2025-06-27 Thread Luc Grosheintz
. Signed-off-by: Luc Grosheintz --- Changes since v4: * Test types with different cv-qualifiers. libstdc++-v3/include/std/mdspan | 31 ++ libstdc++-v3/src/c++23/std.cc.in | 3 +- .../23_containers/mdspan/accessors/default.cc | 99 +++ .../mdspan

Re: [PATCH v3 1/1] libstdc++: Implement default_accessor from mdspan.

2025-06-27 Thread Luc Grosheintz
On 6/27/25 10:28, Tomasz Kaminski wrote: On Fri, Jun 27, 2025 at 9:52 AM Luc Grosheintz wrote: libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * testsuite/23_containers/mdspan

[PATCH v4 1/1] libstdc++: Implement default_accessor from mdspan.

2025-06-27 Thread Luc Grosheintz
. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 31 libstdc++-v3/src/c++23/std.cc.in | 3 +- .../23_containers/mdspan/accessors/default.cc | 72 +++ .../mdspan/accessors/default_neg.cc | 23 ++ 4 files changed, 128

[PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-06-27 Thread Luc Grosheintz
*::operator(). * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add tests for prerequisites. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 4 +++ .../mdspan/layouts/class_mandate_neg.cc | 26 +++ 2 files changed, 30

[PATCH v2 0/5] Implement mdspan.

2025-06-27 Thread Luc Grosheintz
lt it made sense to at least propose it. Luc Grosheintz (5): libstdc++: Check prerequisites of layout_*::operator(). libstdc++: Check prerequite of extents::extents. libstdc++: Restructure mdspan tests to reuse IntLike. libstdc++: Implement mdspan and tests. libstdc++: Make mdspan no

[PATCH v4 0/1] Implement default_accessor.

2025-06-27 Thread Luc Grosheintz
This fourth iteration adds several additional tests to confirm the pointer convertiblity constraint of the ctor. Luc Grosheintz (1): libstdc++: Implement default_accessor from mdspan. libstdc++-v3/include/std/mdspan | 31 libstdc++-v3/src/c++23/std.cc.in

[PATCH v2 3/5] libstdc++: Restructure mdspan tests to reuse IntLike.

2025-06-27 Thread Luc Grosheintz
/mdspan/extents/custom_integer.cc: Delete IntLike and include "int_like.h". * testsuite/23_containers/mdspan/extents/int_like.h: Add IntLike. Signed-off-by: Luc Grosheintz --- .../mdspan/extents/custom_integer.cc | 27 +- .../23_contain

Re: [PATCH v4 0/6] Implement mdspan.

2025-07-15 Thread Luc Grosheintz
On 7/14/25 08:57, Tomasz Kaminski wrote: Hi Luc, While running the libc++ test on libstdc++ we have found the following issue in our implementation. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121061 Would you be interested in looking into fixing this? Yes, I'll take care of this. Do you k

Re: [PATCH v1 0/3] Fix custom IndexType related bugs in mdspan.

2025-07-17 Thread Luc Grosheintz
On 7/17/25 16:16, Tomasz Kaminski wrote: Thank you for the fast response and fixes. I will next week experiment with running libc++ test, so will confirm here if they are all fixed. On Wed, Jul 16, 2025 at 3:47 PM Luc Grosheintz wrote: These three commits fix PR121061. The first prepares

Re: [PATCH v3 0/5] Implement mdspan.

2025-07-04 Thread Luc Grosheintz
Additionally, I think we can set __cpp_lib_mdspan. On 7/4/25 10:29, Luc Grosheintz wrote: This patch series replaces: https://gcc.gnu.org/pipermail/libstdc++/2025-June/062207.html Addresses the review comments and improves commit messages. Most notably the unnecessary patch to "str

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Luc Grosheintz
On 7/8/25 11:32, Jonathan Wakely wrote: On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz wrote: PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate

Re: [PATCH v3 0/5] Implement mdspan.

2025-07-07 Thread Luc Grosheintz
, do you want to create it? I can also prepare that patch, but given that you provided the whole implementation, it would be nice to have also this one attributed to you. I think I have it ready somewhere. I'll find it and send it. On Fri, Jul 4, 2025 at 3:18 PM Luc Grosheintz

Re: [PATCH v3 5/5] libstdc++: Implement mdspan and tests [PR107761].

2025-07-07 Thread Luc Grosheintz
On 7/7/25 11:52, Jonathan Wakely wrote: On Fri, 4 Jul 2025 at 09:37, Luc Grosheintz wrote: Implements the class mdspan as described in N4950, i.e. without P3029. It also adds tests for mdspan. This commit completes the implementation of P0009, i.e. the C++23 part . PR libstdc

Re: [PATCH v1] libstdc++: Set FMT for complete C++23 mdspan.

2025-07-07 Thread Luc Grosheintz
On 7/7/25 11:45, Tomasz Kaminski wrote: On Mon, Jul 7, 2025 at 11:41 AM Luc Grosheintz wrote: libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate. * testsuite

Re: [PATCH v1] libstdc++: Set FMT for complete C++23 mdspan.

2025-07-07 Thread Luc Grosheintz
you mean that I should update mdspan [v3 4/5] and [v3 5/5] but leave the first three commits alone? I would have just updated all commits according to the suggestions you made. On Mon, Jul 7, 2025 at 1:27 PM Luc Grosheintz wrote: On 7/7/25 13:24, Tomasz Kaminski wrote: On Mon, Jul 7, 2025

Re: [PATCH v3 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-07 Thread Luc Grosheintz
On 7/4/25 10:29, Luc Grosheintz wrote: Previously, the prerequisite that the arguments passed to operator() are a multi-dimensional index (of extents()) was not checked. Both mapping::operator() and mdspan::operator[] have the same prerequisite. Since, mdspan must check the prerequisite for

[PATCH v1] libstdc++: Set FMT for complete C++23 mdspan.

2025-07-07 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate. * testsuite/23_containers/mdspan/mdspan_ftm.cc: Test presence of FTM. Signed-off-by: Luc Grosheintz --- libstdc++-v3

Re: [PATCH v3 2/5] libstdc++: Check prerequisite of extents::extents.

2025-07-07 Thread Luc Grosheintz
On 7/7/25 11:13, Tomasz Kaminski wrote: On Mon, Jul 7, 2025 at 11:09 AM Jonathan Wakely wrote: On Fri, 4 Jul 2025 at 09:30, Luc Grosheintz wrote: Previously the prerequisite of the extents ctors that static_extent(i) == dynamic_extent || extent(i) == other.extent(i). was not

Re: Add template keyword to for Clang

2025-07-07 Thread Luc Grosheintz
On 7/5/25 01:13, Jonathan Wakely wrote: Clang wants this change: --- a/libstdc++-v3/include/std/mdspan +++ b/libstdc++-v3/include/std/mdspan @@ -509,7 +509,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template concept __mapping_of = - is_same_v, + is_same_v,

Re: [PATCH v1] libstdc++: Set FMT for complete C++23 mdspan.

2025-07-07 Thread Luc Grosheintz
On 7/7/25 13:24, Tomasz Kaminski wrote: On Mon, Jul 7, 2025 at 12:34 PM Luc Grosheintz wrote: On 7/7/25 11:45, Tomasz Kaminski wrote: On Mon, Jul 7, 2025 at 11:41 AM Luc Grosheintz libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove

[PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Luc Grosheintz
tto. * testsuite/23_containers/span/deduction.cc: Test deduction guide. * testsuite/23_containers/mdspan/extents/misc.cc: ditto. * testsuite/23_containers/mdspan/mdspan.cc: ditto. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 8 ++ libs

[PATCH v2 1/2] libstdc++: Silence a warning in a test for span.

2025-07-08 Thread Luc Grosheintz
In a test of span, there's an unused variable myspan. This commit silences the warning. libstdc++-v3/ChangeLog: * testsuite/23_containers/span/contiguous_range_neg.cc: Silence warning about unused variable myspan. Signed-off-by: Luc Grosheintz --- .../testsuite/23_conta

Re: [PATCH v1 0/3] Implement aligned_accessor [P2897R7].

2025-07-08 Thread Luc Grosheintz
/wg21/docs/papers/2024/p2897r7.html On 7/3/25 12:33, Luc Grosheintz wrote: This patch series implements the aligned_accessor paper P2897R7 in three parts: - Implement `is_sufficiently_aligned` which is part of . - Prepare the accessor tests for reuse. - Implement aligned_accessor. A coup

[PATCH v4 0/6] Implement mdspan.

2025-07-08 Thread Luc Grosheintz
making sure the test fails. This version of the patch series also adds the commit to update the FTM. The changes are: * Update the commit message to mention the related ticket. * Rename the file. * Implement a more verbose version of the test. Luc Grosheintz (6): libstdc++: Check p

[PATCH v4 5/6] libstdc++: Implement mdspan and tests [PR107761].

2025-07-08 Thread Luc Grosheintz
: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 285 libstdc++-v3/src/c++23/std.cc.in | 3 +- .../23_containers/mdspan/class_mandate_neg.cc | 41 ++ .../23_containers/mdspan/layout_like.h| 83 +++ .../testsuite/23_containers/mdspan/mdspan.cc

[PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Luc Grosheintz
PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate. * testsuite/23_containers/mdspan/ftm.cc: Test presence of FTM. Signed-off-by: Luc

Re: [PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Luc Grosheintz
tents): ditto. (mdspan): ditto. * testsuite/23_containers/span/deduction.cc: Test deduction guide. * testsuite/23_containers/mdspan/extents/misc.cc: ditto. * testsuite/23_containers/mdspan/mdspan.cc: ditto. Signed-off-by: Luc Grosheintz --- libstdc++-v3/inclu

Re: [PATCH v2 4/5] libstdc++: Implement mdspan and tests.

2025-07-03 Thread Luc Grosheintz
ers/mdspan/class_mandate_neg.cc: New test. * testsuite/23_containers/mdspan/mdspan.cc: New test. * testsuite/23_containers/mdspan/layout_like.h: Add class LayoutLike which models a user-defined layout. Signed-off-by: Luc Grosheintz --- As usual really solid implementation, few

Re: [PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-03 Thread Luc Grosheintz
On 7/3/25 12:45, Jonathan Wakely wrote: On Thu, 3 Jul 2025 at 11:12, Tomasz Kaminski wrote: On Thu, Jul 3, 2025 at 12:08 PM Luc Grosheintz wrote: The reasoning for this approach was: 1. The mapping::operator() and mdspan::operator[] have the same precondition; and mdspan::operator

[PATCH v1 2/3] libstdc++: Prepare test code for default_accessor for reuse.

2025-07-03 Thread Luc Grosheintz
All test code of default_accessor can be reused. This commit moves the reuseable code into a file generic.cc and prepares the tests for reuse with aligned_accessor. The AllocatorTrait creates a unified interface for creating both default_accessor and aligned_accessor typenames. libstdc++-v3/Chang

[PATCH v1 0/3] Implement aligned_accessor [P2897R7].

2025-07-03 Thread Luc Grosheintz
ufficiently_aligned and 23_containers/mdspan. The last commit was tested fully with/without PCH. All tests on x86_64-linux. As always I'm happy to reorganize into different commits, if the grouping doesn't make sense. Luc Grosheintz (3): libstdc++: Implement is_sufficiently_aligned.

[PATCH v1 1/3] libstdc++: Implement is_sufficiently_aligned.

2025-07-03 Thread Luc Grosheintz
This commit implements and tests the function is_sufficiently_aligned from P2897R7. libstdc++-v3/ChangeLog: * include/bits/align.h (is_sufficiently_aligned): New function. * include/bits/version.def (is_sufficiently_aligned): Add. * include/bits/version.h: Regenerate.

[PATCH v1 3/3] libstdc++: Implement aligned_accessor from mdspan.

2025-07-03 Thread Luc Grosheintz
This commit completes the implementation of P2897R7 by implementing and testing the template class aligned_accessor. libstdc++-v3/ChangeLog: * include/bits/version.def (aligned_accessor): Add. * include/bits/version.h: Regenerate. * include/std/mdspan (aligned_accessor): N

Re: [PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-03 Thread Luc Grosheintz
eturn when we do optimization or hardening. 3. Start measuring to figure out the cost of these checks; and then decide. I'm open to all three. Hope, the above makes sense. Regards, Tomasz On Fri, Jun 27, 2025 at 11:12 AM Luc Grosheintz wrote: Previously the prerequisite tha

[PATCH v3 5/5] libstdc++: Implement mdspan and tests [PR107761].

2025-07-04 Thread Luc Grosheintz
: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 284 + libstdc++-v3/src/c++23/std.cc.in | 3 +- .../23_containers/mdspan/class_mandate_neg.cc | 41 ++ .../23_containers/mdspan/layout_like.h| 80 +++ .../testsuite/23_containers/mdspan/mdspan.cc

[PATCH v3 0/5] Implement mdspan.

2025-07-04 Thread Luc Grosheintz
utstanding tasks for C++23 mdspan are: - Update cxxapi-data.csv, - Update C++23 status page. IIUC, the cxxapi-data.csv can be updated separately in bulk for all of C++23 mdspan and I can take care of it in a follow up patch. I'm not entirely sure when and by whom the status page i

  1   2   3   4   >