Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
thread_util.h File Reference
#include <execution>
#include <future>
#include <mutex>
#include <numeric>
#include <thread>
Include dependency graph for thread_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 hgps
 Top-level namespace for Health-GPS C++ API.
 
 hgps::core
 Top-level namespace for Health-GPS Core C++ API.
 

Functions

template<class F , class... Ts>
auto hgps::core::run_async (F &&action, Ts &&...params)
 Run a given function asynchronous. More...
 
template<class Policy , class Index , class UnaryFunction >
auto hgps::core::parallel_for (Policy &&policy, Index first, Index last, UnaryFunction func)
 Parallel for each over an indexed accessed containers. More...
 
template<class Policy , class T , class UnaryPredicate >
auto hgps::core::find_index_of_all (Policy &&policy, const T &data, UnaryPredicate pred)
 Finds index of all occurrences in a container. More...
 

Variables

constexpr auto hgps::core::execution_policy = std::execution::par
 Default execution policy. More...