Remix.run Logo
pjmlp 14 hours ago

And the C++ version is add std::execution::par_unseq as parameter to the ranges algorithm.

MeetingsBrowser 9 hours ago | parent [-]

This has the same drawbacks as "#pragma omp for".

The hard part isn't splitting loop iterations between threads, but doing so _safely_.

Proving an arbitrary loop's iterations are split in a memory safe way is an NP hard problem in C and C++, but the default behavior in Rust.