Academic Journal

Annotation‐Guided AoS‐to‐SoA Conversions and GPU Offloading With Data Views in C++.

Λεπτομέρειες βιβλιογραφικής εγγραφής
Τίτλος: Annotation‐Guided AoS‐to‐SoA Conversions and GPU Offloading With Data Views in C++.
Συγγραφείς: Radtke, Pawel K., Weinzierl, Tobias
Πηγή: Concurrency & Computation: Practice & Experience; 9/25/2025, Vol. 37 Issue 21/22, p1-23, 23p
Θεματικοί όροι: C++, Annotations, Data structures, Mathematical optimization, Compilers (Computer programs)
Περίληψη: The C++ programming language provides classes and structs as fundamental modeling entities. Consequently, C++ code tends to favor array‐of‐structs (AoS) for encoding data sequences, even though structure‐of‐arrays (SoA) yields better performance for some calculations. We propose a C++ language extension based on attributes that allows developers to guide the compiler in selecting memory arrangements, that is, to select the optimal choice between AoS and SoA dynamically depending on both the execution context and algorithm step. The compiler can then automatically convert data into the preferred format prior to the calculations and convert results back afterward. The compiler handles all the complexity of determining which data to convert and how to manage data transformations. Our implementation realizes the compiler‐extension for the new annotations in Clang and demonstrates their effectiveness through a smoothed particle hydrodynamics (SPH) code, which we evaluate on an Intel CPU, an ARM CPU, and a Grace‐Hopper GPU. While the separation of concerns between data structure and operators is elegant and provides performance improvements, the new annotations do not eliminate the need for performance engineering. Instead, they challenge conventional performance wisdom and necessitate rethinking approaches how to write efficient implementations. [ABSTRACT FROM AUTHOR]
Copyright of Concurrency & Computation: Practice & Experience is the property of Wiley-Blackwell and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Βάση Δεδομένων: Complementary Index
Περιγραφή
ISSN:15320626
DOI:10.1002/cpe.70199