Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Created April 9, 2018 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loliGothicK/b98cef3b61c7928bb285eea2cac14ddd to your computer and use it in GitHub Desktop.
Save loliGothicK/b98cef3b61c7928bb285eea2cac14ddd to your computer and use it in GitHub Desktop.
using namespace std::execution; // 実行ポリシーが定義された名前空間
std::vector<int> v = { /* ... */ };
std::sort(v.begin(), v.end()); // これまでと同じ
std::sort(seq, v.begin(), v.end()); // 明示的にシーケンシャルを指定
std::sort(par, v.begin(), v.end()); // 並列実行を許可するオーバーロード
std::sort(par_unseq, v.begin(), v.end()); // 並列and/orベクトル実行を許可するオーバーロード
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment