GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
divideconquer.h
Go to the documentation of this file.
1 
20 #ifndef GRPPI_DIVIDECONQUER_H
21 #define GRPPI_DIVIDECONQUER_H
22 
23 #include <utility>
24 
26 
27 namespace grppi {
28 
50 template <typename Execution, typename Input,
51  typename Divider, typename Solver, typename Combiner>
52 [[deprecated("Use newer divide_conquer with predicate arguemnt")]]
54  const Execution & ex,
55  Input && input,
56  Divider && divider_op,
57  Solver && solver_op,
58  Combiner && combiner_op)
59 {
60  static_assert(supports_divide_conquer<Execution>(),
61  "divide/conquer pattern not supported for execution type");
62  return ex.divide_conquer(std::forward<Input>(input),
63  std::forward<Divider>(divider_op), std::forward<Solver>(solver_op),
64  std::forward<Combiner>(combiner_op));
65 }
66 
82 template <typename Execution, typename Input,
83  typename Divider,typename Predicate, typename Solver, typename Combiner>
85  const Execution & ex,
86  Input && input,
87  Divider && divider_op,
88  Predicate && predicate_op,
89  Solver && solver_op,
90  Combiner && combiner_op)
91 {
92  static_assert(supports_divide_conquer<Execution>(),
93  "divide/conquer pattern not supported for execution type");
94  return ex.divide_conquer(std::forward<Input>(input),
95  std::forward<Divider>(divider_op),
96  std::forward<Predicate>(predicate_op),
97  std::forward<Solver>(solver_op),
98  std::forward<Combiner>(combiner_op));
99 }
100 
106 }
107 
108 #endif
Definition: callable_traits.h:26
auto divide_conquer(const Execution &ex, Input &&input, Divider &&divider_op, Solver &&solver_op, Combiner &&combiner_op)
Invoke Divide/conquer pattern. Execution Execution type.
Definition: divideconquer.h:53