Alexander Stepanov introduced us to generic programming more than 3 decades ago. Despite its apparent simplicity and a plethora of popular C++ framework implementations, multidimensional arrays remained elusive to generic programming and generic algorithms. In this presentation, I will show how a multidimensional array component was designed from the ground up to integrate efficiently into the universe of generic programming. I will use existing STL algorithms and modern concepts, along with legacy constraints, as a reference point to guide design choices. In the process, we will introduce several auxiliary classes that leverage reference and value semantics to provide a familiar syntax and enable a compact recursive implementation. We will then generalize to different memory spaces and execution models, including parallel and GPU-friendly algorithms. We will see how this enables automatic forward (and legacy) compatibility with several libraries, including Ranges and Boost.
View Slides
Alfredo A. Correa is a Computational Physicist at Lawrence Livermore National Laboratory (LLNL). His research focuses on the application, theoretical development, and software engineering of first-principles methods to simulate materials at the atomic scale.
He develops C++ libraries to exploit HPC hybrid MPI/GPU systems, and he is a recent member of the C++ Standards Committee, the MPI Forum, the ExaNLA high-performance consortium, and the LLNL’s Institutional Computing Executive Group.