From 1b24301cc5c26793e113de810f5cd175384aa2a4 Mon Sep 17 00:00:00 2001 From: Alexey Kukanov Date: Fri, 26 Sep 2025 19:35:50 +0200 Subject: [PATCH 1/2] Enable _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC for __INTEL_LLVM_COMPILER --- include/oneapi/dpl/pstl/onedpl_config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/oneapi/dpl/pstl/onedpl_config.h b/include/oneapi/dpl/pstl/onedpl_config.h index 68e7cba1a72..59830f51f67 100644 --- a/include/oneapi/dpl/pstl/onedpl_config.h +++ b/include/oneapi/dpl/pstl/onedpl_config.h @@ -175,13 +175,18 @@ # define _ONEDPL_PRAGMA_SIMD_EARLYEXIT #endif -#define _ONEDPL_MONOTONIC_PRESENT (__INTEL_COMPILER >= 1800) #if (defined(_PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC) && _PSTL_MONOTONIC_PRESENT) # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \ _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) -#elif _ONEDPL_MONOTONIC_PRESENT +#elif (__INTEL_COMPILER >= 1800) +# define _ONEDPL_MONOTONIC_PRESENT 1 # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _ONEDPL_PRAGMA(omp ordered simd monotonic(PRM)) +# define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \ + _ONEDPL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2)) +#elif (__INTEL_LLVM_COMPILER >= 20230000) +# define _ONEDPL_MONOTONIC_PRESENT 1 +# define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _ONEDPL_PRAGMA(omp ordered simd ompx_monotonic(PRM)) # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \ _ONEDPL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2)) #else From ce73e23fc3e35551220879e26f4786df403d09f6 Mon Sep 17 00:00:00 2001 From: Alexey Kukanov Date: Fri, 26 Sep 2025 21:15:56 +0200 Subject: [PATCH 2/2] Add __INTEL_HOST_OPENMP to the conditions --- include/oneapi/dpl/pstl/onedpl_config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/oneapi/dpl/pstl/onedpl_config.h b/include/oneapi/dpl/pstl/onedpl_config.h index 59830f51f67..e968fcc3132 100644 --- a/include/oneapi/dpl/pstl/onedpl_config.h +++ b/include/oneapi/dpl/pstl/onedpl_config.h @@ -184,7 +184,8 @@ # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _ONEDPL_PRAGMA(omp ordered simd monotonic(PRM)) # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \ _ONEDPL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2)) -#elif (__INTEL_LLVM_COMPILER >= 20230000) +#elif (__INTEL_LLVM_COMPILER >= 20230000 && __INTEL_HOST_OPENMP) +// __INTEL_HOST_OPENMP is set by -qopenmp[-simd] # define _ONEDPL_MONOTONIC_PRESENT 1 # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _ONEDPL_PRAGMA(omp ordered simd ompx_monotonic(PRM)) # define _ONEDPL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \