Apply clang-format to folly/gen/ (template decls)
[folly.git] / folly / gen / ParallelMap-inl.h
index 7975b21d9b87d904e437ae66841567a2ff1741e4..22063113023e27744c67a1fe0f7934fe936bd794 100644 (file)
@@ -42,7 +42,7 @@ namespace detail {
  *
  *   auto squares = seq(1, 10) | pmap(fibonacci, 4) | sum;
  */
-template<class Predicate>
+template <class Predicate>
 class PMap : public Operator<PMap<Predicate>> {
   Predicate pred_;
   size_t nThreads_;
@@ -53,12 +53,12 @@ class PMap : public Operator<PMap<Predicate>> {
     : pred_(std::move(pred)),
       nThreads_(nThreads) { }
 
-  template<class Value,
-           class Source,
-           class Input = typename std::decay<Value>::type,
-           class Output = typename std::decay<
-             typename std::result_of<Predicate(Value)>::type
-             >::type>
+  template <
+      class Value,
+      class Source,
+      class Input = typename std::decay<Value>::type,
+      class Output = typename std::decay<
+          typename std::result_of<Predicate(Value)>::type>::type>
   class Generator :
     public GenImpl<Output, Generator<Value, Source, Input, Output>> {
     Source source_;
@@ -153,7 +153,7 @@ class PMap : public Operator<PMap<Predicate>> {
         nThreads_(nThreads ? nThreads : sysconf(_SC_NPROCESSORS_ONLN)) {
     }
 
-    template<class Body>
+    template <class Body>
     void foreach(Body&& body) const {
       ExecutionPipeline pipeline(pred_, nThreads_);
 
@@ -190,7 +190,7 @@ class PMap : public Operator<PMap<Predicate>> {
       }
     }
 
-    template<class Handler>
+    template <class Handler>
     bool apply(Handler&& handler) const {
       ExecutionPipeline pipeline(pred_, nThreads_);
 
@@ -238,16 +238,12 @@ class PMap : public Operator<PMap<Predicate>> {
     static constexpr bool infinite = Source::infinite;
   };
 
-  template<class Source,
-           class Value,
-           class Gen = Generator<Value, Source>>
+  template <class Source, class Value, class Gen = Generator<Value, Source>>
   Gen compose(GenImpl<Value, Source>&& source) const {
     return Gen(std::move(source.self()), pred_, nThreads_);
   }
 
-  template<class Source,
-           class Value,
-           class Gen = Generator<Value, Source>>
+  template <class Source, class Value, class Gen = Generator<Value, Source>>
   Gen compose(const GenImpl<Value, Source>& source) const {
     return Gen(source.self(), pred_, nThreads_);
   }