Multidimensional C++
summary
C++23 introduces mdspan, a non-owning multi-dimensional view with parameterized layouts, extents and slicing, but it intentionally omits iterators because common iterator designs either force expensive index reconstructions or produce control flow that blocks compiler vectorization. Examples include a 3D stencil and tiled matrix transpose that work via explicit indexing or submdspan. Proposed fixes range from element-wise iterators and compiler recognizers to a new space-based for protocol that emits efficient nested loops while keeping composability and parallel/async algorithm support.
AI-written summary · about
chapters (9)
- 0:00Introduction to multi-dimensional C++
- 1:07What is mdspan in C++23
- 10:02Layouts and custom accessors
- 13:17Using mdspan with existing types
- 21:45Parallel matrix transpose demo
- 25:38Standard library multi-dimensional algorithms
- 31:17Why no multi-dimensional iterators
- 49:08Future of multi-dimensional iteration
- 1:01:03Q&A session
related talks
01h 30mTaming C++23 - The Things About C++23 You Do Not Know
04mmulti_span<...>
01h 34mGeneric Programming for Multidimensional Arrays
06mC++ Multi-dimensional Arrays With Value Semantics
01h 00mIntroducing a matrix class to the C++ standard library
39mC++ Multi-dimensional Arrays...
59mHow C++23 changes the way we write code
54mGeneric Programming Without (Writing Your Own) Templates
