GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
farm.h
Go to the documentation of this file.
1 
21 #ifndef GRPPI_FARM_H
22 #define GRPPI_FARM_H
23 
24 #include "common/farm_pattern.h"
25 
26 namespace grppi {
27 
44 template <typename Transformer>
45 auto farm(int ntasks, Transformer && transform_op)
46 {
47  return farm_t<Transformer>{ntasks,
48  std::forward<Transformer>(transform_op)};
49 }
50 
56 }
57 
58 #endif
Definition: callable_traits.h:26
auto farm(int ntasks, Transformer &&transform_op)
Invoke Farm pattern on a data stream that can be composed in other streaming patterns.
Definition: farm.h:45
Representation of farm pattern. Represents a farm of n replicas from a transformer.
Definition: farm_pattern.h:33