public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-2273] libstdc++: Enable OpenMP 5.0 pragmas in PSTL headers Date: Mon, 3 Jul 2023 23:07:37 +0000 (GMT) [thread overview] Message-ID: <20230703230737.4CD50385697D@sourceware.org> (raw) https://gcc.gnu.org/g:8bef8e713fd5f17c5dee45d9bb7ffca3cf3c0f9d commit r14-2273-g8bef8e713fd5f17c5dee45d9bb7ffca3cf3c0f9d Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Jun 30 11:17:56 2023 +0100 libstdc++: Enable OpenMP 5.0 pragmas in PSTL headers This reapplies r10-1314-g32bab8b6ad0a90 which was lost in the recent PSTL rebase from upstream. * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN, _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN): Define to OpenMP 5.0 pragmas even for GCC 10.0+. (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+. Diff: --- libstdc++-v3/include/pstl/pstl_config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/pstl/pstl_config.h b/libstdc++-v3/include/pstl/pstl_config.h index 74d2139c736..ccb9dd32838 100644 --- a/libstdc++-v3/include/pstl/pstl_config.h +++ b/libstdc++-v3/include/pstl/pstl_config.h @@ -82,7 +82,8 @@ # define _PSTL_PRAGMA_FORCEINLINE #endif -#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900 +#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900) || \ + (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 100000) # define _PSTL_PRAGMA_SIMD_SCAN(PRM) _PSTL_PRAGMA(omp simd reduction(inscan, PRM)) # define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan inclusive(PRM)) # define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan exclusive(PRM)) @@ -126,7 +127,8 @@ # define _PSTL_UDR_PRESENT #endif -#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626 +#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626) || \ + (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 100000) # define _PSTL_UDS_PRESENT #endif
reply other threads:[~2023-07-03 23:07 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230703230737.4CD50385697D@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).