The Shapes of Multi-Dimensional Arrays
summary
Claims that C++20 non-type template parameters make a compact, composable shape DSL possible and demonstrates a proof‑of‑concept that injects expression‑template templates to declare mixed static/dynamic extents with defaults, indexed extenders, and layout/parallelization annotations. Implements a shaper/extent/nd_span stack that encodes rank, static sizes, and runtime sizes, shows it handles high ranks (examples up to six dimensions and use cases with billions of elements), and outlines the embedded domain-specific language design plus an optimization “log‑table” trick for low overhead.
AI-written summary · about
chapters (10)
- 0:00Introduction to multi-dimensional arrays
- 5:28Current C++ linear algebra efforts
- 11:31Understanding mdspan proposal
- 29:18Balancing expressivity and performance
- 33:07C++20 template parameter flexibility
- 34:57Embedded DSL for array shapes
- 47:56Handling static and dynamic extents
- 54:01Extending the domain-specific language
- 58:42Future of C++ and genericity
- 1:01:11Timeline for standardization








