WeightedLowess
A C++ library for LOWESS with various weighting schemes
Loading...
Searching...
No Matches
parallelize.hpp
Go to the documentation of this file.
1#ifndef WEIGHTEDLOWESS_PARALLELIZE_HPP
2#define WEIGHTEDLOWESS_PARALLELIZE_HPP
3
9#ifndef WEIGHTEDLOWESS_CUSTOM_PARALLEL
10#include "subpar/subpar.hpp"
11#endif
12
13namespace WeightedLowess {
14
31template<typename Task_, class Run_>
32int parallelize(const int num_workers, const Task_ num_tasks, Run_ run_task_range) {
33#ifndef WEIGHTEDLOWESS_CUSTOM_PARALLEL
34 // Various methods don't allocate or throw, so nothrow_ = true is fine.
35 return subpar::parallelize_range<true>(num_workers, num_tasks, std::move(run_task_range));
36#else
37 return WEIGHTEDLOWESS_CUSTOM_PARALLEL(num_workers, num_tasks, run_task_range);
38#endif
39}
40
41}
42
43#endif
Namespace for LOWESS functions.
Definition compute.hpp:18
int parallelize(const int num_workers, const Task_ num_tasks, Run_ run_task_range)
Definition parallelize.hpp:32
int parallelize_range(int num_workers, const Task_ num_tasks, const Run_ run_task_range)