Skip to content

Commit

Permalink
Define CeedPragmaSIMD for Clang (CEED#1432)
Browse files Browse the repository at this point in the history
* Define CeedPragmaSIMD for Clang

* Change clang loop vectorization pragma
  • Loading branch information
sebastiangrimberg authored Jan 3, 2024
1 parent f1b7d38 commit b569baa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ceed/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ values for CPU backends.
/// Miscompilation with pragma ivdep observed with icc (ICC) 19.0.5.281 20190815 at -O2 and above.
#elif defined(__GNUC__) && __GNUC__ >= 5
#define CeedPragmaSIMD _Pragma("GCC ivdep")
#elif defined(__clang__)
#define CeedPragmaSIMD _Pragma("clang loop vectorize(enable)")
#elif defined(_OPENMP) && _OPENMP >= 201307 // OpenMP-4.0 (July, 2013)
#define CeedPragmaSIMD _Pragma("omp simd")
#else
Expand Down

0 comments on commit b569baa

Please sign in to comment.