[libcxx-commits] [PATCH] D155512: [libc++][PSTL] Add vectorization annotations when clang is used

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 28 11:03:01 PDT 2023


philnik updated this revision to Diff 545227.
philnik added a comment.

Try to fix CI


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155512/new/

https://reviews.llvm.org/D155512

Files:
  libcxx/include/__config


Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -1409,6 +1409,16 @@
 #    define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)                                                                   \
       _PSTL_PRAGMA(omp declare reduction(NAME:OP : omp_out(omp_in)) initializer(omp_priv = omp_orig))
 
+#  elif defined(_LIBCPP_COMPILER_CLANG_BASED)
+
+#    define _PSTL_PRAGMA_SIMD _Pragma("clang loop vectorize(enable) interleave(enable)")
+#    define _PSTL_PRAGMA_DECLARE_SIMD
+#    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _Pragma("clang loop vectorize(enable) interleave(enable)")
+#    define _PSTL_PRAGMA_SIMD_SCAN(PRM) _Pragma("clang loop vectorize(enable) interleave(enable)")
+#    define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM)
+#    define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM)
+#    define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)
+
 #  else // (defined(_OPENMP) && _OPENMP >= 201307)
 
 #    define _PSTL_PRAGMA_SIMD


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155512.545227.patch
Type: text/x-patch
Size: 1031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230728/4de5cbeb/attachment.bin>


More information about the libcxx-commits mailing list