Template Function uw12::parallel::parallel_sum
Defined in File parallel.hpp
Function Documentation
-
template<typename ReturnType>
ReturnType uw12::parallel::parallel_sum(const size_t start, const size_t stop, const ReturnType &identity, const std::function<ReturnType(size_t)> &func, const bool parallel = true) Construct an object in parallel
Construct an object of type
ReturnTypein parallel for each input integer in range [start, stop).- Template Parameters
ReturnType –
- Parameters
start – Initial value
stop – Final value (excluded)
identity – Identity value
func – Parallel function
parallel – Run in parallel
- Returns
Object of type
ReturnType