kokkos / mdarray

Other
10 stars 9 forks source link

P1684: Better explain why mdarray is not a container #16

Open mhoemmen opened 2 years ago

mhoemmen commented 2 years ago

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 design

Drawbacks of mdarray-as-container design

Benefits of "container adapter" design

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 or queue. This is more of an issue for wording than for design, but it's still something to keep in mind.