[libcxx-commits] [pstl] r362155 - [pstl] Use OpenMP pragmas with Clang, which supports them

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 30 14:09:19 PDT 2019


Author: ldionne
Date: Thu May 30 14:09:19 2019
New Revision: 362155

URL: http://llvm.org/viewvc/llvm-project?rev=362155&view=rev
Log:
[pstl] Use OpenMP pragmas with Clang, which supports them

Most importantly, Clang doesn't seem to support the non-OpenMP pragmas
that were being used previously.

Modified:
    pstl/trunk/include/pstl/internal/pstl_config.h

Modified: pstl/trunk/include/pstl/internal/pstl_config.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/pstl_config.h?rev=362155&r1=362154&r2=362155&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/pstl_config.h (original)
+++ pstl/trunk/include/pstl/internal/pstl_config.h Thu May 30 14:09:19 2019
@@ -50,7 +50,7 @@
 #endif
 
 // Enable SIMD for compilers that support OpenMP 4.0
-#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900)
+#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || defined(__clang__)
 #    define _PSTL_PRAGMA_SIMD _PSTL_PRAGMA(omp simd)
 #    define _PSTL_PRAGMA_DECLARE_SIMD _PSTL_PRAGMA(omp declare simd)
 #    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _PSTL_PRAGMA(omp simd reduction(PRM))




More information about the libcxx-commits mailing list