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
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
.
* 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
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.
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++
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
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
.
* 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
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
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
* 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(+
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
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
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
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
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
.
* 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
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
* 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(+
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
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
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
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
.
* 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
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
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
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
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
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
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++
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
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
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
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
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
.
* 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
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
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
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
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
* 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(+
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
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
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
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
.
* 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
/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
.
* 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
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+
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+
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
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
* 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(+
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,
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
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
);
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
.
* 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
.
* 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
/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
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
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
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
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
.
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
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
.
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
*::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
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
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
/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
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
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
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
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
, 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
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
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
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
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
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
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
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,
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
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
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
/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
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
: 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
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
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
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
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
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
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.
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.
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
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
: 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
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 - 100 of 390 matches
Mail list logo