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

ABSTRACT 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.

Authors

Institutions

Publication Details

Journal
Concurrency and Computation Practice and Experience
Published
2025-08-04
DOI
https://doi.org/10.1002/cpe.70199
Citations
2
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
4.54

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Tobias Weinzierl, Pawel K. Radtke
2 citations
Concurrency and Computation Practice and Experience
Parallel Computing and Optimization Techniques
4.54
article

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

Tobias Weinzierl, Pawel K. Radtke
article en
2 citations

Abstract

ABSTRACT 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.

Concurrency and Computation Practice and ExperienceVol. 37(21-22)
Durham University (GB)
UK Research and Innovation, Durham University, Engineering and Physical Sciences Research Council, Science and Technology Facilities Council
Openalex Percentile: Top 6%
Parallel Computing and Optimization Techniques
4.54
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Annotation‐Guided AoS‐to‐SoA Conversions and GPU Offloading With Data Views in C++ — Tobias Weinzierl, Pawel K. Radtke · Concurrency and Computation Practice and Experience (2025) | TGRS Research Map | TGRS