Classes | Typedefs | Functions
WireCellTbb Namespace Reference

Classes

class  DataFlowGraph
 
class  FaninBody
 
class  FaninWrapper
 
class  FunctionBody
 
class  FunctionWrapper
 
class  JoinBody
 
class  JoinWrapper
 
class  MockDepoSink
 
class  MockDepoSource
 
class  MockDrifter
 
class  NodeWrapper
 
class  QueuedoutBody
 
class  QueuedoutWrapper
 
class  SinkBody
 
class  SinkNodeWrapper
 
class  SourceBody
 
class  SourceNodeWrapper
 
class  TbbFlow
 
class  WrapperFactory
 
struct  WrapperMaker
 
struct  WrapperMakerT
 

Typedefs

typedef tbb::flow::sender< boost::any > sender_type
 
typedef tbb::flow::receiver< boost::any > receiver_type
 
typedef std::vector< sender_type * > sender_port_vector
 
typedef std::vector< receiver_type * > receiver_port_vector
 
typedef std::vector< boost::any > any_vector
 
typedef std::tuple< boost::any > any_single
 
typedef std::tuple< boost::any, boost::any > any_double
 
typedef std::tuple< boost::any, boost::any, boost::any > any_triple
 
typedef tbb::flow::source_node< boost::any > source_node
 Types for TBB nodes. More...
 
typedef tbb::flow::function_node< boost::any > sink_node
 
typedef tbb::flow::function_node< boost::any, boost::any > function_node
 
typedef tbb::flow::multifunction_node< boost::any, any_singlequeuedout_node
 
typedef queuedout_node::output_ports_type queuedout_port
 
typedef std::shared_ptr< NodeWrapperNode
 

Functions

template<std::size_t N>
receiver_port_vector build_faniner (tbb::flow::graph &graph, WireCell::INode::pointer wcnode, tbb::flow::graph_node *&joiner, tbb::flow::graph_node *&caller)
 
template<std::size_t N>
receiver_port_vector build_joiner (tbb::flow::graph &graph, WireCell::INode::pointer wcnode, tbb::flow::graph_node *&joiner, tbb::flow::graph_node *&caller)
 
template<typename Tuple , std::size_t... Is>
receiver_port_vector receiver_ports (tbb::flow::join_node< Tuple > &jn, std::index_sequence< Is... >)
 
template<typename Tuple >
receiver_port_vector receiver_ports (tbb::flow::join_node< Tuple > &jn)
 Return receiver ports of a join node as a vector. More...
 

Detailed Description

This adapts the queued out node category to a TBB multifunction node.

Facade/adapter to TBB for source node category.

Typedef Documentation

typedef std::tuple<boost::any,boost::any> WireCellTbb::any_double

Definition at line 24 of file NodeWrapper.h.

typedef std::tuple<boost::any> WireCellTbb::any_single

Definition at line 23 of file NodeWrapper.h.

typedef std::tuple<boost::any,boost::any,boost::any> WireCellTbb::any_triple

Definition at line 25 of file NodeWrapper.h.

typedef std::vector<boost::any> WireCellTbb::any_vector

Definition at line 21 of file NodeWrapper.h.

typedef tbb::flow::function_node<boost::any,boost::any> WireCellTbb::function_node

Definition at line 30 of file NodeWrapper.h.

typedef std::shared_ptr<NodeWrapper> WireCellTbb::Node

Definition at line 51 of file NodeWrapper.h.

typedef tbb::flow::multifunction_node<boost::any,any_single> WireCellTbb::queuedout_node

Definition at line 31 of file NodeWrapper.h.

typedef queuedout_node::output_ports_type WireCellTbb::queuedout_port

Definition at line 32 of file NodeWrapper.h.

Definition at line 19 of file NodeWrapper.h.

typedef tbb::flow::receiver<boost::any> WireCellTbb::receiver_type

Definition at line 16 of file NodeWrapper.h.

Definition at line 18 of file NodeWrapper.h.

typedef tbb::flow::sender<boost::any> WireCellTbb::sender_type

Definition at line 15 of file NodeWrapper.h.

typedef tbb::flow::function_node<boost::any> WireCellTbb::sink_node

Definition at line 29 of file NodeWrapper.h.

typedef tbb::flow::source_node<boost::any> WireCellTbb::source_node

Types for TBB nodes.

Definition at line 28 of file NodeWrapper.h.

Function Documentation

template<std::size_t N>
receiver_port_vector WireCellTbb::build_faniner ( tbb::flow::graph &  graph,
WireCell::INode::pointer  wcnode,
tbb::flow::graph_node *&  joiner,
tbb::flow::graph_node *&  caller 
)

Definition at line 37 of file FaninCat.h.

39  {
40  typedef typename WireCell::type_repeater<N, boost::any>::type TupleType;
41 
42  // this node is fully TBB and joins N receiver ports into a tuple
43  typedef tbb::flow::join_node< TupleType > tbb_join_node_type;
44  tbb_join_node_type* jn = new tbb_join_node_type(graph);
45  joiner = jn;
46 
47  // this node takes user WC body and runs it after converting input tuple to vector
48  typedef tbb::flow::function_node<TupleType,boost::any> joining_node;
49  joining_node* fn = new joining_node(graph, wcnode->concurrency(), FaninBody<TupleType>(wcnode));
50  caller = fn;
51 
52  tbb::flow::make_edge(*jn, *fn);
53 
54  //FaninNodeInputPorts<TupleType,N> ports;
55  //return ports(*jn);
56  return receiver_ports(*jn);
57  }
receiver_port_vector receiver_ports(tbb::flow::join_node< Tuple > &jn, std::index_sequence< Is... >)
Definition: NodeWrapper.h:56
def graph(desc, maker=maker)
Definition: apa.py:294
QAsciiDict< Entry > fn
template<std::size_t N>
receiver_port_vector WireCellTbb::build_joiner ( tbb::flow::graph &  graph,
WireCell::INode::pointer  wcnode,
tbb::flow::graph_node *&  joiner,
tbb::flow::graph_node *&  caller 
)

Definition at line 36 of file JoinCat.h.

38  {
39  typedef typename WireCell::type_repeater<N, boost::any>::type TupleType;
40 
41  // this node is fully TBB and joins N receiver ports into a tuple
42  typedef tbb::flow::join_node< TupleType > tbb_join_node_type;
43  tbb_join_node_type* jn = new tbb_join_node_type(graph);
44  joiner = jn;
45 
46  // this node takes user WC body and runs it after converting input tuple to vector
47  typedef tbb::flow::function_node<TupleType,boost::any> joining_node;
48  joining_node* fn = new joining_node(graph, wcnode->concurrency(), JoinBody<TupleType>(wcnode));
49  caller = fn;
50 
51  tbb::flow::make_edge(*jn, *fn);
52 
53  //JoinNodeInputPorts<TupleType,N> ports;
54  //return ports(*jn);
55  return receiver_ports(*jn);
56  }
receiver_port_vector receiver_ports(tbb::flow::join_node< Tuple > &jn, std::index_sequence< Is... >)
Definition: NodeWrapper.h:56
def graph(desc, maker=maker)
Definition: apa.py:294
QAsciiDict< Entry > fn
template<typename Tuple , std::size_t... Is>
receiver_port_vector WireCellTbb::receiver_ports ( tbb::flow::join_node< Tuple > &  jn,
std::index_sequence< Is... >   
)

Definition at line 56 of file NodeWrapper.h.

56  {
57  return { dynamic_cast<receiver_type*>(&tbb::flow::input_port<Is>(jn))... };
58  }
tbb::flow::receiver< boost::any > receiver_type
template<typename Tuple >
receiver_port_vector WireCellTbb::receiver_ports ( tbb::flow::join_node< Tuple > &  jn)

Return receiver ports of a join node as a vector.

Definition at line 61 of file NodeWrapper.h.

61  {
63  }
receiver_port_vector receiver_ports(tbb::flow::join_node< Tuple > &jn)
Return receiver ports of a join node as a vector.
Definition: NodeWrapper.h:61
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225