Parallel C++ program compiler available?

Is there a C++ compiler such as g++ or Microsoft C++ or
any on-line compiler with all C++17 &
Parallel TS (Technical Standard) features
that can compile below given parallel C++ programs please?

Following web site has small program to parallel sum elements of Vector:

http://en.cppreference.com/w/cpp/experimental/reduce

#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <chrono>
#include <vector>
#include <numeric>
// #include <experimental/execution_policy>
// #include <experimental/numeric>
#include <experimental/execution_policy>
#include <experimental/numeric>

int main()
{
std::vector<double> v(10'000'007, 0.5);

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::accumulate(v.begin(), v.end(), 0.0);
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration<double, std::milli> ms = t2 - t1;
std::cout << std::fixed << "std::accumulate result " << result
<< " took " << ms.count() << " ms\n";
}

{
auto t1 = std::chrono::high_resolution_clock::now();
double result = std::experimental::parallel::reduce(
std::experimental::parallel::par,
v.begin(), v.end());
auto t2 = std::chrono::high_resolution_clock::now();
std::chrono::duration<double, std::milli> ms = t2 - t1;
std::cout << "parallel::reduce result "
<< result << " took " << ms.count() << " ms\n";
}
}


Above program output will be:

<
std::accumulate result 5000003.50000 took 12.7365 ms
parallel::reduce result 5000003.50000 took 5.06423 ms
>

I compiled this program using Microsoft Visual C++ 2017 Professional.

Compiler is giving following errors:

cannot open source file "experimental/execution_policy"

cannot open source file "experimental/numeric"

Any information to resolve these compilation errors please?

Thanks

Good question.
As far as I can see the standard required these features since 2016:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0024r2.html

But they haven’t been implemented neither by gcc:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z
(Library fature: The Parallelism TS Should be Standardized; Proposal: P0024R2; Status: No; SD-6 Feature Test: __has_include(<execution>) , __cpp_lib_parallel_algorithm >= 201603)

nor by Ms compiler:
https://blogs.msdn.microsoft.com/vcblog/2017/08/11/c17-features-and-stl-fixes-in-vs-2017-15-3/
(Status:missing; Std: C++17; Paper: P0024R2; Title: Parallel Algorithms; Notes: [parallel])

Is there someone who has got different information?
Thank you Enoizat for the information.
If any of the compiler development companies announced a major update to their C++ compilers that will include Parallelism TS features, C++ professionals will be happier to know please.
We hope they release such compiler(s) soon.
Topic archived. No new replies allowed.