Loading…
CppCon 2020 has ended
Back To Schedule
Thursday, September 17 • 09:00 - 10:00
The Shapes of Multi-Dimensional Arrays

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
In 2020, linear algebra is still not a part of standard C++. Worse than that, beyond the good old C-style multidimensional arrays, the standard library still does not provide modern tools to handle such objects. In the era of machine learning and artificial intelligence, this is starting to get embarrassing. But why is that? Why does everything is always so much more complicated in C++ than in other higher level language?

In this talk we will focus on one of the many problems involved: how to handle the shapes and dimensions of high-performance multidimensional arrays? To prevent template metaprogramming wizards from providing a completely unusable answer, we will add one requirement: it has to be concise, expressive, and understandable by humans.

To answer this question, we will see how C++20's Non-Type Template Parameters can be leveraged to build a mini-embedded compile-time language to specify the size of matrices while combining expressiveness and conciseness. We will see how this technique can allow to mix static and dynamic dimensions while ensuring the highest level of performance. We will also discuss how it could be exploited to express parallelization and vectorization, as well as sparse storage patterns. At the big picture level, this talk will also explore why bringing generic Non-Type Template Parameters may have opened a very nice Pandora's box in C++.

Speakers
avatar for Vincent Reverdy

Vincent Reverdy

Researcher in Astrophysics and Mathematics, Ecole Normale Supérieure
Vincent has been working as a post-doctoral researcher at the University of Illinois at Urbana-Champaign (USA) since he obtained his PhD at the Paris observatory (France) in november 2014. His main scientific interests are related to cosmology and general relativity. He his particularly... Read More →


Thursday September 17, 2020 09:00 - 10:00 MDT
destroy_n()