Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use experimental parallel STL in C++1z?

I want to try parallel STL of C++17. However, I can't find experimental/execution_policy in libc++. How can I try this?

I'm trying http://en.cppreference.com/w/cpp/experimental/reduce, which says I should include these files, but I cannot find execution_policy.

#include <experimental/execution_policy>

After I install libc++ (I followed http://libcxx.llvm.org/docs/BuildingLibcxx.html), I tried the following commands, but in vain.

$ clang++-3.5 -std=c++1z test.cpp -lc++experimental
test.cpp:5:10: fatal error: 'experimental/execution_policy' file not found
#include <experimental/execution_policy>
         ^
1 error generated.

Is this not implemented yet?

like image 858
Ryo Wakatabe Avatar asked May 17 '17 09:05

Ryo Wakatabe


Video Answer


1 Answers

Is this not implemented yet?

That is correct. Neither the parallelism TS (which would live in <experimental/xxx> or the parallel algorithms in the (not yet final) C++1z standard have been implemented in libc++ (yet).

like image 166
Marshall Clow Avatar answered Nov 13 '22 17:11

Marshall Clow