| 24 | #endif |
| 25 | |
| 26 | template <typename ContainerType> void parallel_loop_container(const ContainerType& c, std::function<void(const typename ContainerType::value_type&)> func, bool forceSingleThread = false) { |
| 27 | #if defined(__EMSCRIPTEN__) || defined(__ANDROID__) |
| 28 | std::for_each(c.begin(), c.end(), func); |
| 29 | #else |
| 30 | if(forceSingleThread) |
| 31 | std::for_each(c.begin(), c.end(), func); |
| 32 | else |
| 33 | std::for_each(std::execution::par_unseq, c.begin(), c.end(), func); |
| 34 | #endif |
| 35 | } |
| 36 | |
| 37 | template <typename ContainerType> void parallel_loop_container_mutable(ContainerType& c, std::function<void(typename ContainerType::value_type&)> func, bool forceSingleThread = false) { |
| 38 | #if defined(__EMSCRIPTEN__) || defined(__ANDROID__) |
no test coverage detected