‹ Retornar à série de vídeos: Parallel Programming Track

Improve Vectorization Efficiency

  • Visão geral
  • Recursos

Speakers: Anoop Madhusoodhanan Prabha and Alex Wells, Intel

Application developers like to stick to the object-oriented style of programming by designing their application's logic as interaction between different object entities. In this process, every entity is modeled as a C++ class or structure. Array of structure (AoS) maintains a collection of those entities, which makes the code more readable and easier to maintain. But, this user-friendly code can potentially pose a challenge when it comes to vectorization efficiency. Often, the data needed for populating the vector register is gathered since the data is laid out in non-unit stride fashion in the main memory. To make the data layout more vector-friendly, developers often had to change their data structures manually from AoS to a structure of arrays (SoA). Single instruction multiple data (SIMD) layout templates from Intel help developers preserve an AoS interface while programming but, under the hood, the data structure is laid out in an SoA format. This is a win-win solution for both object-oriented and vector-friendly programming.

This presentation demonstrates how to analyze the memory access pattern in your performance-sensitive loops and how to enable the layout templates to make changes from constant- and variable-strided memory accesses to unit-strided memory access wherever possible.