Compiler support for semi-manual AoS-to-SoA conversions with data views
Pawel K. Radtke, Tobias Weinzierl

TL;DR
This paper introduces a C++ language extension with compiler support for semi-manual AoS-to-SoA conversions using data views, enabling flexible data layout experimentation in high-performance computing applications.
Contribution
It proposes a novel language extension with annotations for guiding automatic data layout conversions in C++, implemented in Clang.
Findings
Enables easy experimentation with data layouts in C++ code.
Automates data conversions based on developer annotations.
Demonstrates effectiveness in a smoothed particle hydrodynamics application.
Abstract
The C programming language and its cousins such as C++ stipulate the static storage of sets of structured data: Developers have to commit to one, invariant data model -- typically a structure-of-arrays (SoA) or an array-of-structs (AoS) -- unless they manually rearrange, i.e.~convert it throughout the computation. Whether AoS or SoA is favourable depends on the execution context and algorithm step. We propose a language extension based upon C++ attributes through which developers can guide the compiler what memory arrangements are to be used. The compiler can then automatically convert (parts of) the data into the format of choice prior to a calculation and convert results back afterwards. As all conversions are merely annotations, it is straightforward for the developer to experiment with different storage formats and to pick subsets of data that are subject to memory rearrangements.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Interconnection Networks and Systems
