ATLAS Offline Software
Macros
Control/CxxUtils/CxxUtils/vectorize.h File Reference

Helper to enable (more agressive) auto-vectorization. More...

#include "CxxUtils/features.h"
Include dependency graph for Control/CxxUtils/CxxUtils/vectorize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ATH_ENABLE_TREE_VECTORIZATION   class ATH_ENABLE_TREE_VECTORIZATION_SWALLOW_SEMICOLON
 

Detailed Description

Helper to enable (more agressive) auto-vectorization.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
May, 2019 Athena is usually built with -O2. From gcc 12 and onwards this results to (gcc -O2 -Q –help=optimizers) -ftree-loop-vectorize [enabled] -ftree-slp-vectorize [enabled] -ftree-vectorize [disabled] -fvect-cost-model=[unlimited|dynamic|cheap|very-cheap] very-cheap (clang uses a more agressive default model in -O2)

There are cases where we prefer to use the gcc cheap model rather than the very cheap. This can be achieved by enabling tree-vectorize (gcc -O2 -ftree-vectorize -Q –help=optimizers) -ftree-loop-vectorize [enabled] -ftree-slp-vectorize [enabled] -ftree-vectorize [enabled] -fvect-cost-model=[unlimited|dynamic|cheap|very-cheap] cheap

Add ATH_ENABLE_TREE_VECTORIZATION; at the start of a compilation unit to enable it for this file.

Add ATH_ENABLE_FUNCTION_VECTORIZATION before a function to enable it for just this function

We disable the functionality for gcc 14 and later. Since spot tests do not show any noticeable difference.

Definition in file Control/CxxUtils/CxxUtils/vectorize.h.

Macro Definition Documentation

◆ ATH_ENABLE_TREE_VECTORIZATION

#define ATH_ENABLE_TREE_VECTORIZATION   class ATH_ENABLE_TREE_VECTORIZATION_SWALLOW_SEMICOLON

Definition at line 53 of file Control/CxxUtils/CxxUtils/vectorize.h.