The std::any_of 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%
#include "pstl/execution"
#include "pstl/algorithm"
void foo(float* a, int n)
{
std::sort(std::execution::%policy%, a, a+n);
}