Indico is back online after maintenance on Tuesday, April 30, 2024.
Please visit Jefferson Lab Event Policies and Guidance before planning your next event:

May 8 – 12, 2023
Norfolk Waterside Marriott
US/Eastern timezone

Kiwaku, a C++20 library for multidimensional arrays, applied to ACTS tracking

May 8, 2023, 2:15 PM
Hampton Roads Ballroom VI (Norfolk Waterside Marriott)

Hampton Roads Ballroom VI

Norfolk Waterside Marriott

235 East Main Street Norfolk, VA 23510
Oral Track 3 - Offline Computing Track 3 - Offline Computing


Mr Joube, Sylvain (IJCLab - LISN, Universit Paris-Saclay, CNRS/IN2P3)


Track reconstruction, also known as tracking, is a vital part of the HEP event reconstruction process, and one of the largest consumers of computing resources. The upcoming HL-LHC upgrade will exacerbate the need for efficient software able to make good use of the underlying heterogeneous hardware. However, this evolution should not imply the production of code unintelligible to most of its maintainers, hence the need to provide good usability to both end users and developers.

C++ has been a language of choice for efficient scientific computing tasks. The Generative Programming paradigm [CZAR98], which relies on heavy type based template meta-programming, provides a powerful solution for supporting multiple execution contexts[MASL16]. Yet, the templates are usually blamed for binary bloat, high code complexity and unreadable error messages.

In this presentation, we will discuss recent developments made to the C++ language, helping to define a new process for constructing libraries both efficient and easy to use, using a streamlined Generative Programming process:
• easier code selection at compile time using “if constexpr”
• better error reporting using “Concepts”, i.e. compile-time type constraints
• easier meta-programming with Non-Type Template Parameters

We will then introduce Kiwaku[KWK22], a new multidimensional arrays library taking advantage of the most recent C++ usability improvements, yet providing portable performance on various execution contexts (CPU, GPU). We will finally discuss a few proofs of concept, based on use-cases borrowed from the ACTS toolkit[ACTS22]: magnetic field computation, clustering and seeding.


[ACTS22] Ai, X., Allaire, C., Calace, N. et al. A Common Tracking Software Project. Comput Softw Big Sci 6, 8 (2022).

[CZAR98] Krzysztof Czarnecki, Ulrich W. Eisenecker, Robert Glück, David Vandevoorde, Todd L. Veldhuizen: "Generative Programming and Active Libraries". Generic Programming 1998: 25-39

[KWK22] Kiwaku main repository -

[MASL16] Ian Masliah, Marc Baboulin, Joel Falcou: "Meta-programming and Multi-stage Programming for GPGPUs". 2016 IEEE 10th International Symposium on Embedded Multicore/Many-core Systems-on-Chip (MCSOC)

Consider for long presentation No

Primary authors

Mr Joube, Sylvain (IJCLab - LISN, Universit Paris-Saclay, CNRS/IN2P3) Dr Chamont, David (CNRS - IN2P3 - IJCLab) falcou, joel (LISN - CODE RECKONS) Grasland, Hadrien (IJCLab, Université Paris-Saclay, CNRS/IN2P3) Radosavljevic, Sasa (LISN)

Presentation materials

Peer reviewing