In c ++ 17, you should be able to run standard algorithms, for example, std::sort :

 template< class ExecutionPolicy, class RandomIt > void sort( ExecutionPolicy&& policy, RandomIt first, RandomIt last ); 

in parallel mode, passing the appropriate type of execution policy . Does any of the available online compilers currently support this functionality?

All attempts to connect <execution> while ended about the same :

 fatal error: execution: No such file or directory #include <execution> ^~~~~~~~~~~ compilation terminated. 
  • four
    gcc - status - isnullxbh
  • four
    clang - status - isnullxbh
  • 2
    @free_ze if even offline there are no such compilers, what to talk about online: D - D-side
  • one
    @free_ze, did you open links? :) What can be online compilers) - isnullxbh
  • one
    @isnullxbh by the way, useful information on the links. It seems to me that it should be added to the description of the label c ++ . - αλεχολυτ

1 answer 1

The Parallelism TS should be Standardized
[parallel versions of STL algorithms]


N4507 - preliminary version of the standard
P0024R2 - Specification

Support status of this feature in Clang :
https://libcxx.llvm.org/cxx1z_status.html
[not implemented at the moment]

Support status of this feature in GCC : https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z
[not implemented at the moment]

However, there are ready implementations:

  1. Lutz
  2. Microsoft
  3. Nvidia
  • one
    And you can summarize the words? And then on the links to go too lazy, and they foul. - VladD
  • @VladD, yes, of course :) - isnullxbh
  • The common name of the feature is "The Parallelism TS Should be Standardized". Well, a direct link to the document can be. - αλεχολυτ
  • @VladD words should be rotten this year too :) - αλεχολυτ
  • @alexolut: Yeah, I usually add in such cases “At the moment (February 2017) ...” - VladD