Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize when libc++ has an implementation of parallel algorithms #1832

Open
akukanov opened this issue Sep 10, 2024 · 0 comments
Open

Recognize when libc++ has an implementation of parallel algorithms #1832

akukanov opened this issue Sep 10, 2024 · 0 comments

Comments

@akukanov
Copy link
Contributor

Currently, the oneDPL configuration macro that defines presence of C++17 execution policies in the standard library completely ignores libc++:

// Should be defined to 1 for environments with a vendor implementation of C++17 execution policies
#define _ONEDPL_CPP17_EXECUTION_POLICIES_PRESENT \
(_ONEDPL___cplusplus >= 201703L && (_MSC_VER >= 1912 || (_GLIBCXX_RELEASE >= 9 && __GLIBCXX__ >= 20190503)))

However, since LLVM 17 there is partial support for std parallelism in libc++, guarded by #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17. It's off by default but can be enabled as an experimental functionality by a special macro or a compiler flag (see https://libcxx.llvm.org/UserDocumentation.html#enabling-experimental-c-library-features).

So these conditions need to be added to the definition of our configuration macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant