https://cppcon.org/
---
Symbolic Calculus for High-performance Computing From Scratch Using C++23 - Vincent Reverdy - CppCon 2023
https://github.com/CppCon/CppCon2023
Wouldn't it be nice to be able to type and manipulate symbolic mathematical formulas directly in C++? On top of providing a much more natural interface for scientists to express their ideas in code, it would constitute a particularly relevant approach to disentangle scientific application domains on one side, and high-performance computing and low-level optimizations on the other side. In this talk, we will see how building symbolic calculus tools can be achieved in plain C++23 without any compiler magic. We will see how symbolic derivatives and integrals can be computed at compile-time and we will see how the technique can be leveraged to speed-up linear algebra computations. A particular focus will be given to the concepts and to the building blocks so that the approach can be easily tweaked and adjusted to other problems, and it will be shown that the decoupling of concerns allows to combine genericity, expressivity, and high-performance in code.
In practice, we will dive into a new take on expression templates that modern C++ makes much easier to handle. In particular, we will introduce stateless formulas as a way to avoid some of the complexities that use to make traditional expression templates especially difficult to manage in codebases. We will see how Class Template Argument Deduction and unevaluated lambdas as template parameters can be combined to produce uniquely typed symbolic variables that will serve as the atoms of symbolic formulas. Implementation strategies to optimize both compile-time and runtime performance will be discussed. The talk will be illustrated with numerous examples together with their corresponding generated assembly code to show that the zero-cost abstraction principle is ensured by the set of presented techniques. Beyond the technical aspects, a broader discussion will be opened on how this approach can be combined with existing and upcoming linear algebra components of the C++ standard library (mdspan, mdarray, BLAS...) to ensure the highest level of performance when it comes to scientific computing.
The goal of this talk is really to highlight the overall strategy of implementation and the set of techniques necessary to bring symbolic calculus into high-performance code and make it as accessible as possible so that everyone can play with it. The evolution of C++ has made it much simpler to implement such things.
---
Vincent Reverdy
Vincent Reverdy is a Full Researcher in Computer Science and Astrophysics at French Center for Scientific Research (CRNS) and located at the Annecy Laboratory for Particle Physics (LAPP) in the French Alps. He also is a member of the French delegation to the C++ Standards Committee. After a PhD at the Paris Observatory in 2014 on the topic of numerical cosmology and general relativity for which he explored extensively advanced metaprogramming techniques, he joined the University of Illinois at Urbana-Champaign in the US. There, he led an interdisciplinary research group in both computer science and computational astrophysics, trying to bridge the gap between programming languages and computational sciences. In late 2019 he moved back to France to continue to work on software architecture aspects related to astrophysics, and joined CNRS in January 2022 to lead long-term research aiming at building bridges between theoretical computer science including type theory and category theory on one side, and computational sciences with a focus on numerical astrophysics on the other side. Finally, as a member of the C++ committee, he has been working extensively on low-level programming components, including bit manipulation, as well as mathematical abstractions.
__
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: https://events.digital-medium.co.uk
---
Registration for CppCon: https://cppcon.org/registration/
#cppcon #cppprogramming #cpp
Смотрите видео Symbolic Calculus for High-performance Computing From Scratch Using C++23 - Vincent Reverdy - CppCon онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал CppCon 06 Февраль 2024. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 14,970 раз и оно понравилось 292 посетителям.