This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
P1684: Better explain why mdarray is not a container #16
Labels
P1684
Issues in P1684, the specification of mdarray
This comes from 1684R2 LEWG review on 2022/04/19.
The review expressed a preference for the current "container adapter" (but see below) design. Those not preferring that design expressed the concern documented as #15. Regardless, participants wanted us to explain better in the paper the trade-offs between the current "container adapter" (but see below) design, and an
mdarray
-as-container design. Here is a draft of that explanation.(R0 design had a "container policy" to do automatic switching. R1 went away from that.)
Benefits of
mdarray
-as-container designDrawbacks of
mdarray
-as-container designstatic_mdarray
" vs "dynamic_mdarray
") to handle all-static-extents vs. some-dynamic-extents cases, just likearray
vs.vector
mdspan
design, which uses a single class for both casesKokkos::View
and EigenBenefits of "container adapter" design
array
move is more expensive thanvector
move)mdspan
's Accessor)One reviewer pointed out that it's not necessarily accurate to call the current design a "container adapter." This is because the dynamic or static nature of extents are separate from what's contained. The properties are customizable, not like
stack
orqueue
. This is more of an issue for wording than for design, but it's still something to keep in mind.The text was updated successfully, but these errors were encountered: