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:luc.groshei...@gmail.com>> 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:luc.groshei...@gmail.com>> 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
h the flat
implementation. Please let me know if there's more that be checked.
Regards,
Tomasz
On Mon, May 12, 2025 at 5:17 PM Luc Grosheintz
wrote:
On 5/9/25 8:16 AM, Tomasz Kaminski wrote:
The test I would perform would be :
std::layout_left::mapping> l0;
std::layout_right:mapping&g
On 5/9/25 8:16 AM, Tomasz Kaminski wrote:
The test I would perform would be :
std::layout_left::mapping> l0;
std::layout_right:mapping> r0;
// stride
bool all_unique()
{
return l0.is_unique();
return r0.is_unique();
}
And we should have only one is_unique symbol.
but with a lot more d
https://eel.is/c++draft/basic.fundamental#11
https://eel.is/c++draft/meta#tab:meta.unary.cat-row-4
On 5/14/25 9:13 PM, Luc Grosheintz wrote:
The standard states that the IndexType must be a signed or unsigned
integer. This mandate was implemented using `std::is_integral_v`. Which
also inc
The standard states that the IndexType must be a signed or unsigned
integer. This mandate was implemented using `std::is_integral_v`. Which
also includes (among others) char and bool, which neither signed nor
unsigned integers.
libstdc++-v3/ChangeLog:
* include/std/mdspan: Implement the m
On 5/20/25 10:24 AM, Tomasz Kaminski wrote:
On Sun, May 18, 2025 at 10:16 PM Luc Grosheintz
wrote:
Implements the remaining parts of layout_left and layout_right; and all
of layout_stride.
libstdc++-v3/ChangeLog:
* include/std/mdspan(layout_stride): New class.
Signed-off-by
On 5/20/25 10:48 AM, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 10:45 AM Luc Grosheintz
wrote:
On 5/20/25 10:24 AM, Tomasz Kaminski wrote:
On Sun, May 18, 2025 at 10:16 PM Luc Grosheintz <
luc.groshei...@gmail.com>
wrote:
Implements the remaining parts of layout_le
On 5/20/25 11:40 AM, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 11:20 AM Luc Grosheintz
wrote:
On 5/20/25 10:48 AM, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 10:45 AM Luc Grosheintz <
luc.groshei...@gmail.com>
wrote:
On 5/20/25 10:24 AM, Tomasz Kaminski wrote:
On 5/20/25 4:07 PM, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 3:16 PM Luc Grosheintz
wrote:
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by
/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
---
libstdc++-v3/include/std/mdspan
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++-v3/ChangeLog:
* include/std/mdspan (layout_right): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan
precondition in layout_{left,right}(layout_stride)
using `*this == __other`.
* Twice: Use lambda instead of *_impl function.
* Various smaller improvements to the tests.
Luc Grosheintz (6):
libstdc++: Implement layout_left from mdspan.
libstdc++: Add tests for layout_left.
libstdc
Implements the remaining parts of layout_left and layout_right; and all
of layout_stride.
libstdc++-v3/ChangeLog:
* include/std/mdspan(layout_stride): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 211 +++-
1 file changed
On 5/19/25 2:56 PM, Tomasz Kaminski wrote:
On Sun, May 18, 2025 at 10:14 PM Luc Grosheintz
wrote:
Implements a suite of tests for the currently implemented parts of
layout_left. The individual tests are templated over the layout type, to
allow reuse as more layouts are added.
libstdc++-v3
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 | 64
.
* 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 | 22 +
.../23_containers/mdspan/layouts/ctors.cc | 238
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 309 +++-
1 file changed
On 5/19/25 2:56 PM, Tomasz Kaminski wrote:
On Sun, May 18, 2025 at 10:14 PM Luc Grosheintz
wrote:
Implements a suite of tests for the currently implemented parts of
layout_left. The individual tests are templated over the layout type, to
allow reuse as more layouts are added.
libstdc++-v3
On 5/19/25 1:46 PM, Tomasz Kaminski wrote:
On Sun, May 18, 2025 at 10:11 PM Luc Grosheintz
wrote:
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by
On 5/20/25 17:44, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 4:30 PM Luc Grosheintz
wrote:
On 5/20/25 4:07 PM, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 3:16 PM Luc Grosheintz
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc
On 5/21/25 08:29, Tomasz Kaminski wrote:
On Tue, May 20, 2025 at 3:16 PM Luc Grosheintz
wrote:
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by: Luc Grosh
_M_dynamic_extents to _M_exts.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
index e937040900a..a8ec0b159e6 100644
--- a/libstdc++-v3/include/std
bit more
obvious. Additionally, there's numerous changes planned that
might make one of the two functions much more verbose.
Luc Grosheintz (9):
libstdc++: Rename _ExtentsStorage::_M_dynamic_extents.
libstdc++: Rename extents::_M_dynamic_extents.
libstdc++: Cleanup formatting i
-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
index 47cfa405e44..e937040900a 100644
--- a/libstdc++-v3/include/std/mdspan
+++ b/libstdc++-v3
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 307 +++-
1 file changed
libstdc++-v3/ChangeLog:
* include/std/mdspan: Fix two instances of
whitespace errors: `for(` -> `for (`.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std/mdspa
Implements the remaining parts of layout_left and layout_right; and all
of layout_stride.
libstdc++-v3/ChangeLog:
* include/std/mdspan(layout_stride): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 216 +++-
1 file changed
/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
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++-v3/ChangeLog:
* include/std/mdspan (layout_right): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan
.
* 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 | 22 +
.../23_containers/mdspan/layouts/ctors.cc | 238
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 | 64
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 | 64
.
* 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 | 22 +
.../23_containers/mdspan/layouts/ctors.cc | 258
require implementing a formula that doesn't require returning true
in all cases.
Luc Grosheintz (6):
libstdc++: Implement layout_left from mdspan.
libstdc++: Add tests for layout_left.
libstdc++: Implement layout_right from mdspan.
libstdc++: Add tests for layout_right.
li
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++-v3/ChangeLog:
* include/std/mdspan (layout_right): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan
/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
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 240
1 file changed
Implements the remaining parts of layout_left and layout_right; and all
of layout_stride.
libstdc++-v3/ChangeLog:
* include/std/mdspan(layout_stride): New class.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 219 +++-
1 file changed
On 5/22/25 15:21, Tomasz Kaminski wrote:
For the stride and product computation, we should perform them in
Extent::size_type, not index_type.
The latter may be signed, and we may hit UB in multiplying non-zero
extents, before reaching the zero.
Then I observe the following issues:
1. When
from here
3. static_assert(false)
On regular builds with g++ the error message mentions the
static_assert(__is_standard_integer), and is much less
cryptic. Please ignore if this is intended behaviour.
Tested on x86_64 with:
make check-target-libstdc++-v3
(in a no PCH build).
Luc Groshein
Without the message, the compiler output can be very short, e.g.
as short as a `required from here`. If the output includes the
line of code that trigges the static_assert, the user might
interpret it as "must be a standard integer", which is incorrect,
because that term doesn't cover extended inte
On 5/27/25 14:34, Jonathan Wakely wrote:
On Tue, 27 May 2025 at 07:51, Luc Grosheintz wrote:
While reading the compiler output of
make check-target-libstdc++-v3
for buggy code, e.g. cmp_equal(1.0, 1.0), the error message
was very short, and I saw no hint that neither of the two
Since, I believe now we're through the larger questions about
how to implement layouts. If reviewing all three over and over
is too painful, it might now make sense to split the patch into
separate patches, one per layout.
On 5/26/25 16:04, Luc Grosheintz wrote:
This follows up on:
On 5/26/25 18:17, Tomasz Kaminski wrote:
On Mon, May 26, 2025 at 4:15 PM Luc Grosheintz
wrote:
Implements the parts of layout_left that don't depend on any of the
other layouts.
libstdc++-v3/ChangeLog:
* include/std/mdspan (layout_left): New class.
* src/c++23/std.
: Fix two instances of
whitespace errors: `for(` -> `for (`.
Signed-off-by: Luc Grosheintz
---
libstdc++-v3/include/std/mdspan | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mds
1 - 100 of 247 matches
Mail list logo