Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 575370 Details for
Bug 685062
sys-devel/gcc-9 C++17 Parallel algorithms support dependency on dev-cpp/tbb-2018.20180312
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
C++17 parallel execution example
par.cpp (text/plain), 353 bytes, created by
Michael Cook
on 2019-05-05 23:00:13 UTC
(
hide
)
Description:
C++17 parallel execution example
Filename:
MIME Type:
Creator:
Michael Cook
Created:
2019-05-05 23:00:13 UTC
Size:
353 bytes
patch
obsolete
>#include <execution> >#include <algorithm> >#include <mutex> > >int main() >{ > // example from https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t > int x = 0; > std::mutex m; > int a[] = {1, 2}; > std::for_each(std::execution::par, std::begin(a), std::end(a), [&](int) { > std::lock_guard<std::mutex> guard(m); > ++x; // correct > }); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 685062
: 575370