Template Function opensn::ParallelFor

Function Documentation

template<typename Function>
void opensn::ParallelFor(size_t count, size_t num_threads, Function function)

Run function(i) for i in [0, count) across num_threads threads, strided.

Exceptions thrown by any worker are propagated to the caller (first wins).