After reading the documentation I'm still confused about the usage of par_unseq. I know I can't tell anything about the order of execution because of threading and vectorization but can I still rely on the order of the outputs?
transform([x0, x1, x2], f) == [f(x0), f(x1), f(x2)]]
In order words, is this test ever going to fail?
std::vector<int> xs = {1, 2, 3, 4};
std::vector<int> ys(xs.size());
std::transform(
std::execution::par_unseq,
cbegin(xs), cend(xs),
begin(ys),
[](int x) { return x*x; });
std::vector<int> expected = {1, 4, 9, 16};
ASSERT_EQ(expected , ys);