6 #ifndef UTILS_EXT_OMP_H 7 #define UTILS_EXT_OMP_H 21 template<
class C,
class F>
25 using RT = std::vector<decltype(Function(std::declval<typename C::value_type>()))>;
27 const size_t size = container.size();
30 #pragma omp parallel for 31 for (
int i = 0; i < static_cast<int>(size); ++i)
33 result[i] = Function(container[i]);
auto Transformed(const C &container, F Function)
Transforms a container in parallel by passing each element through a callable object (function/functo...
Definition: ExtOMP.h:23
Extensions to OpenMP.
Definition: ExtOMP.h:14