Ask Your Question

In a constexpr context, what is the method for invoking ExecutionPolicy algorithms?

asked 2022-04-07 11:00:00 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-07 21:00:00 +0000

lalupa gravatar image

ExecutionPolicy algorithms can be invoked using the function template std::for_each or one of its variants that accepts an ExecutionPolicy object as the first argument. For example, std::for_each(std::execution::par, std::begin(container), std::end(container), function) would invoke the algorithm on the container using parallel execution policy.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools


Asked: 2022-04-07 11:00:00 +0000

Seen: 9 times

Last updated: Apr 07 '23