move padded layouts and dims from Experimental to the standard namespace#447
Conversation
There was a problem hiding this comment.
Pull request overview
Moves layout_left_padded / layout_right_padded and dims out of the experimental/proposed namespace into the standard namespace to align with their C++26 standardization (closes #404).
Changes:
- Update padded layout definitions and related traits/usages to live in
MDSPAN_IMPL_STANDARD_NAMESPACE/Kokkos::rather than...::Experimental::. - Update
dimsusage toMDSPAN_IMPL_STANDARD_NAMESPACE::dimsand adjust the experimental header accordingly. - Refactor tests, compilation tests, and benchmarks to use the new namespace locations.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_submdspan_static_slice.cpp | Updates expected padded layout types to Kokkos::layout_*_padded. |
| tests/test_submdspan.cpp | Switches padded layout aliases to Kokkos::layout_*_padded; minor whitespace cleanup. |
| tests/test_layout_padded_right.cpp | Updates padded layout and detail trait references from experimental/proposed to standard namespace. |
| tests/test_layout_padded_left.cpp | Updates padded layout and detail trait references from experimental/proposed to standard namespace. |
| tests/test_dims.cpp | Updates dims usage to MDSPAN_IMPL_STANDARD_NAMESPACE::dims. |
| include/experimental/__p2642_bits/layout_padded_fwd.hpp | Removes proposed-namespace wrapping so padded layouts are declared in the standard namespace. |
| include/experimental/__p2642_bits/layout_padded.hpp | Removes proposed-namespace wrapping and updates internal references accordingly. |
| include/experimental/__p2630_bits/submdspan_mapping.hpp | Updates submdspan mapping code to refer to layout_*_padded in the standard namespace. |
| include/experimental/__p2389_bits/dims.hpp | Moves dims alias to the standard namespace (and removes proposed namespace wrapper). |
| include/experimental/__p0009_bits/layout_stride.hpp | Updates trait checks for padded mappings to reference standard detail::is_layout_*_padded_mapping. |
| include/experimental/__p0009_bits/layout_right.hpp | Updates converting ctor constraints/checks to use standard padded-mapping traits and checks. |
| include/experimental/__p0009_bits/layout_left.hpp | Updates converting ctor constraints/checks to use standard padded-mapping traits and checks. |
| compilation_tests/ctest_layout_convertible.cpp | Updates compilation-time checks to use Kokkos::layout_*_padded. |
| benchmarks/sum/sum_3d_common.hpp | Removes unused proposed-namespace alias (now that padded/dims moved). |
| benchmarks/fill.hpp | Removes unused proposed-namespace alias (now that padded/dims moved). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mhoemmen
left a comment
There was a problem hiding this comment.
Should we consider also regenerating the single-header file for Compiler Explorer as part of this PR? It would be excellent for the single-header version to have the same namespaces as the installable version. Thanks! : - )
Let's do that in a separate PR, and maybe after your big guy is through. We also are trying to actually create a release, likely coinciding with Kokkos 5.1.0. That opens an interesting question though: currently Kokkos leadership is leaning towards a recommendation (not enforcement) that we have a unified versioning. The idea being that it will be less confusing inside the Kokkos ecosystem about what belongs together and is tested together. I.e. some of us are just exasperated by stuff like the Visual Studio / MSVC versioning, or even the CUDA versioning where it's kinda hard to decide what is what. Any strong feelings on that? If we go with that recommendation for mdspan, we would release as mdspan 5.1 ... |
|
@mhoemmen wrote:
@crtrott wrote:
That's fine! PR #408 actually fixes the @crtrott wrote:
I think that's a reasonable idea. I'm talking it over with colleagues. Would you plan the same thing for the reference std::linalg implementation as well? |
Closes #404