The std::copy_if algorithm runs sequentially. To run in parallel, use the Parallel STL alternative with one of the following execution polices: with the following execution policy: %polices%
...
std::copy_if(std::execution::%policy%, a, a+n, b, [](float elem)
...#include "pstl/execution"
#include "pstl/algorithm"
void foo(float* a, float* b, int n)
{
std::copy_if(std::execution::%policy%, a, a+n, b, [](float elem)
{
return elem > 10.f;
});
}