7 #include <execution/Executor.h> 
    8 #include <preprocessor/utils.h> 
   29             template <
class TArg, 
class ExecutorAgent, 
class Flow, 
class I>
 
   30             ExFuture<ExecutorAgent, void>
 
   32                   Flow flow, 
int increment = 1 )
 
   44                 auto iterators = getIteratorsFunc();
 
   45                 using IteratorType = decltype( iterators[0] );
 
   47                     typename std::decay<IteratorType>::type>::isArith;
 
   48                 if constexpr ( isArithIterator )
 
   49                     length = ( iterators[1] - iterators[0] );
 
   51                     length = std::distance( iterators[0], iterators[1] );
 
   54                     ( length + increment - 1 ) /
 
   58                 IteratorType i{ iterators[0] };
 
   59                 while ( count++ < nElements )
 
   61                     auto f = flow( i, source );
 
   62                     f.subscribeCallback( [barrier]( 
const auto& ) 
mutable 
   76                 barrier.subscribeCallback(
 
   78                         const ::mel::parallelism::BarrierData& )>(
 
   80                             const ::mel::parallelism::BarrierData& ) 
mutable 
   83                             return ::mel::core::ECallbackResult::UNSUBSCRIBE;
 
   92                     template <
class U, 
class T>
 
   94                         : mGetIts( std::forward<U>( its ) ),
 
   95                           mFlow( std::forward<T>( f ) ), increment( inc )
 
  101                     template <
class TArg, 
class ExecutorAgent>
 
  104                         return flow::loop( inputFut, std::forward<I>( mGetIts ),
 
  105                                            std::forward<F>( mFlow ),
 
  112             template <
class I, 
class F>
 
  117                                                   std::forward<F>( flow ),
 
Executor< ExecutorAgent > agent
execution agent associated with this instance
Definition: ExFuture.h:54
 
Definition: TypeTraits.h:296
 
Multithread barrier.
Definition: Barrier.h:43
 
void set()
Definition: Barrier.h:59
 
ECallbackResult
Type resturned by callbacks subscribed to CallbackSubscriptors.
Definition: CallbackSubscriptor.h:32
 
ExFuture< ExecutorAgent, void > loop(ExFuture< ExecutorAgent, TArg > source, I getIteratorsFunc, Flow flow, int increment=1)
Loop with independent iterations.
Definition: Loop.h:31
 
Definition: Callback_Impl.h:11