[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/PentaBug/taskflow/master/taskflow/algorithm/transform.hpp [Back]  [Original]

#pragma once

#include "launch.hpp"

namespace tf {

// Function: make_transform_task
template <
  typename B, typename E, typename O, typename C, typename P = DefaultPartitioner,
  std::enable_if_t* = nullptr
>
auto make_transform_task(B first1, E last1, O d_first, C c, P part = P()) {

  using B_t = std::decay_t;
  using E_t = std::decay_t;
  using O_t = std::decay_t;
  
  return [=] (Runtime& rt) mutable {

    // fetch the stateful values
    B_t beg   = first1;
    E_t end   = last1;
    O_t d_beg = d_first;

    size_t W = rt.executor().num_workers();
    size_t N = std::distance(beg, end);

    // only myself - no need to spawn another graph
    if(W ;
  using E1_t = std::decay_t;
  using B2_t = std::decay_t;
  using O_t = std::decay_t;

  return [=] (Runtime& rt) mutable {

    // fetch the stateful values
    B1_t beg1 = first1;
    E1_t end1 = last1;
    B2_t beg2 = first2;
    O_t d_beg = d_first;

    size_t W = rt.executor().num_workers();
    size_t N = std::distance(beg1, end1);

    // only myself - no need to spawn another graph
    if(W 

Web Proxy Viewer  |  New URL  |  Original Page