| _flow_graph_join_impl.h | | _flow_graph_join_impl.h | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| the GNU General Public License. | | the GNU General Public License. | |
| */ | | */ | |
| | | | |
| #ifndef __TBB__flow_graph_join_impl_H | | #ifndef __TBB__flow_graph_join_impl_H | |
| #define __TBB__flow_graph_join_impl_H | | #define __TBB__flow_graph_join_impl_H | |
| | | | |
| #ifndef __TBB_flow_graph_H | | #ifndef __TBB_flow_graph_H | |
| #error Do not #include this internal file directly; use public TBB headers
instead. | | #error Do not #include this internal file directly; use public TBB headers
instead. | |
| #endif | | #endif | |
| | | | |
|
| | | #include "tbb/internal/_flow_graph_types_impl.h" | |
| | | | |
| namespace internal { | | namespace internal { | |
| | | | |
| typedef size_t tag_value; | | typedef size_t tag_value; | |
| static const tag_value NO_TAG = tag_value(-1); | | static const tag_value NO_TAG = tag_value(-1); | |
| | | | |
| struct forwarding_base { | | struct forwarding_base { | |
| forwarding_base(task *rt) : my_root_task(rt), current_tag(NO_TAG) {
} | | forwarding_base(task *rt) : my_root_task(rt), current_tag(NO_TAG) {
} | |
| virtual ~forwarding_base() {} | | virtual ~forwarding_base() {} | |
| virtual void decrement_port_count() = 0; | | virtual void decrement_port_count() = 0; | |
| virtual void increment_port_count() = 0; | | virtual void increment_port_count() = 0; | |
| | | | |
| skipping to change at line 1037 | | skipping to change at line 1039 | |
| broadcast_cache<output_type, null_rw_mutex> my_successors; | | broadcast_cache<output_type, null_rw_mutex> my_successors; | |
| | | | |
| friend class forward_task< join_node_base<JP, InputTuple, OutputTup
le> >; | | friend class forward_task< join_node_base<JP, InputTuple, OutputTup
le> >; | |
| | | | |
| void forward() { | | void forward() { | |
| join_node_base_operation op_data(do_fwrd); | | join_node_base_operation op_data(do_fwrd); | |
| my_aggregator.execute(&op_data); | | my_aggregator.execute(&op_data); | |
| } | | } | |
| }; | | }; | |
| | | | |
|
| //! unfolded_join_node : passes input_ports_type to join_node_base. We | | // join base class type generator | |
| build the input port type | | | |
| // using tuple_element. The class PT is the port type (reserving_port | | | |
| , queueing_port, tag_matching_port) | | | |
| // and should match the graph_buffer_policy. | | | |
| template<int N, template<class> class PT, typename OutputTuple, graph_b
uffer_policy JP> | | template<int N, template<class> class PT, typename OutputTuple, graph_b
uffer_policy JP> | |
|
| class unfolded_join_node; | | struct join_base { | |
| | | typedef typename internal::join_node_base<JP, typename wrap_tuple_e | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | lements<N,PT,OutputTuple>::type, OutputTuple> type; | |
| olicy JP> | | | |
| class unfolded_join_node<2,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > | | | |
| { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | }; | |
| | | | |
|
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | //! unfolded_join_node : passes input_ports_type to join_node_base. We | |
| olicy JP> | | build the input port type | |
| class unfolded_join_node<3,PT,OutputTuple,JP> : public internal::join_n | | // using tuple_element. The class PT is the port type (reserving_port | |
| ode_base<JP, | | , queueing_port, tag_matching_port) | |
| std::tuple< | | // and should match the graph_buffer_policy. | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > | | | |
| { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<4,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<5,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<6,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<7,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<8,PT,OutputTuple,JP> : public internal::join_n | | | |
| ode_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | | |
| unfolded_join_node(graph &g) : base_type(g) {} | | | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | | |
| er) {} | | | |
| }; | | | |
| | | | |
|
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | template<int N, template<class> class PT, typename OutputTuple, graph_b | |
| olicy JP> | | uffer_policy JP> | |
| class unfolded_join_node<9,PT,OutputTuple,JP> : public internal::join_n | | class unfolded_join_node : public join_base<N,PT,OutputTuple,JP>::type | |
| ode_base<JP, | | { | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<8,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<8,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | | |
| private: | | | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ | | | |
| e; | | | |
| public: | | public: | |
|
| unfolded_join_node(graph &g) : base_type(g) {} | | typedef typename wrap_tuple_elements<N, PT, OutputTuple>::type inpu | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth | | t_ports_type; | |
| er) {} | | | |
| }; | | | |
| | | | |
| template<template<class> class PT, typename OutputTuple, graph_buffer_p | | | |
| olicy JP> | | | |
| class unfolded_join_node<10,PT,OutputTuple,JP> : public internal::join_ | | | |
| node_base<JP, | | | |
| std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<8,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<9,OutputTuple>::type> >, | | | |
| OutputTuple | | | |
| > { | | | |
| public: | | | |
| typedef typename std::tuple< | | | |
| PT<typename std::tuple_element<0,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<1,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<2,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<3,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<4,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<5,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<6,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<7,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<8,OutputTuple>::type>, | | | |
| PT<typename std::tuple_element<9,OutputTuple>::type> > inpu | | | |
| t_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<JP, input_ports_type, output_type > base_typ
e; | | typedef join_node_base<JP, input_ports_type, output_type > base_typ
e; | |
| public: | | public: | |
| unfolded_join_node(graph &g) : base_type(g) {} | | unfolded_join_node(graph &g) : base_type(g) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
| | | | |
| // tag_matching unfolded_join_node. This must be a separate specializa
tion because the constructors | | // tag_matching unfolded_join_node. This must be a separate specializa
tion because the constructors | |
| // differ. | | // differ. | |
| | | | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<2,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<2,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<2,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type> >, | | | |
| OutputTuple | | | |
| > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po
rt<T1> > input_ports_type; | | typedef typename wrap_tuple_elements<2,tag_matching_port,OutputTupl
e>::type input_ports_type; | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename std::tuple< f0_p, f1_p > func_initializer_type; | | typedef typename std::tuple< f0_p, f1_p > func_initializer_type; | |
| public: | | public: | |
| template<typename B0, typename B1> | | template<typename B0, typename B1> | |
| unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g, | | unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g, | |
| func_initializer_type( | | func_initializer_type( | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1) | | new internal::function_body_leaf<T1, tag_value, B1>(b1) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
| | | | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<3,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<3,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<3,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type> >, | | | |
| OutputTuple | | | |
| > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<3, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2> | | ple>::type input_ports_type; | |
| > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename std::tuple< f0_p, f1_p, f2_p > func_initializer_ty
pe; | | typedef typename std::tuple< f0_p, f1_p, f2_p > func_initializer_ty
pe; | |
| public: | | public: | |
| template<typename B0, typename B1, typename B2> | | template<typename B0, typename B1, typename B2> | |
| unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2) : base_type(g, | | unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2) : base_type(g, | |
| func_initializer_type( | | func_initializer_type( | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2) | | new internal::function_body_leaf<T2, tag_value, B2>(b2) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
| | | | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<4,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<4,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<4,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<4, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3> > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p > func_initiali
zer_type; | | typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p > func_initiali
zer_type; | |
| public: | | public: | |
| template<typename B0, typename B1, typename B2, typename B3> | | template<typename B0, typename B1, typename B2, typename B3> | |
| | | | |
| skipping to change at line 1389 | | skipping to change at line 1143 | |
| func_initializer_type( | | func_initializer_type( | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3) | | new internal::function_body_leaf<T3, tag_value, B3>(b3) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
| | | | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<5,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<5,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<5,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<5, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4> > input_ports_ | | | |
| type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_in
itializer_type; | | typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_in
itializer_type; | |
| public: | | public: | |
| | | | |
| skipping to change at line 1428 | | skipping to change at line 1174 | |
| func_initializer_type( | | func_initializer_type( | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4) | | new internal::function_body_leaf<T4, tag_value, B4>(b4) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
| | | | |
|
| | | #if __TBB_VARIADIC_MAX >= 6 | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<6,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<6,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<6,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<5,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| typedef typename std::tuple_element<5, OutputTuple>::type T5; | | typedef typename std::tuple_element<5, OutputTuple>::type T5; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<6, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4>, tag_matching_ | | | |
| port<T5> > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename internal::function_body<T5, tag_value> *f5_p; | | typedef typename internal::function_body<T5, tag_value> *f5_p; | |
| typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > f
unc_initializer_type; | | typedef typename std::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > f
unc_initializer_type; | |
| | | | |
| skipping to change at line 1471 | | skipping to change at line 1209 | |
| func_initializer_type( | | func_initializer_type( | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | | new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | |
| new internal::function_body_leaf<T5, tag_value, B5>(b5) | | new internal::function_body_leaf<T5, tag_value, B5>(b5) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
|
| | | #if __TBB_VARIADIC_MAX >= 7 | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<7,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<7,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<7,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<5,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<6,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| typedef typename std::tuple_element<5, OutputTuple>::type T5; | | typedef typename std::tuple_element<5, OutputTuple>::type T5; | |
| typedef typename std::tuple_element<6, OutputTuple>::type T6; | | typedef typename std::tuple_element<6, OutputTuple>::type T6; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<7, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4>, tag_matching_ | | | |
| port<T5>, tag_matching_port<T6> | | | |
| > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename internal::function_body<T5, tag_value> *f5_p; | | typedef typename internal::function_body<T5, tag_value> *f5_p; | |
| typedef typename internal::function_body<T6, tag_value> *f6_p; | | typedef typename internal::function_body<T6, tag_value> *f6_p; | |
| | | | |
| skipping to change at line 1520 | | skipping to change at line 1249 | |
| new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | | new internal::function_body_leaf<T0, tag_value, B0>(b0)
, | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | | new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | |
| new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | | new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | |
| new internal::function_body_leaf<T6, tag_value, B6>(b6) | | new internal::function_body_leaf<T6, tag_value, B6>(b6) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
|
| | | #if __TBB_VARIADIC_MAX >= 8 | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<8,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<8,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<8,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<5,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<6,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<7,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| typedef typename std::tuple_element<5, OutputTuple>::type T5; | | typedef typename std::tuple_element<5, OutputTuple>::type T5; | |
| typedef typename std::tuple_element<6, OutputTuple>::type T6; | | typedef typename std::tuple_element<6, OutputTuple>::type T6; | |
| typedef typename std::tuple_element<7, OutputTuple>::type T7; | | typedef typename std::tuple_element<7, OutputTuple>::type T7; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<8, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4>, tag_matching_ | | | |
| port<T5>, tag_matching_port<T6>, | | | |
| tag_matching_port<T7> > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename internal::function_body<T5, tag_value> *f5_p; | | typedef typename internal::function_body<T5, tag_value> *f5_p; | |
| typedef typename internal::function_body<T6, tag_value> *f6_p; | | typedef typename internal::function_body<T6, tag_value> *f6_p; | |
| | | | |
| skipping to change at line 1573 | | skipping to change at line 1292 | |
| new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | | new internal::function_body_leaf<T1, tag_value, B1>(b1)
, | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | | new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | |
| new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | | new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | |
| new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | | new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | |
| new internal::function_body_leaf<T7, tag_value, B7>(b7) | | new internal::function_body_leaf<T7, tag_value, B7>(b7) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
|
| | | #if __TBB_VARIADIC_MAX >= 9 | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<9,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<9,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<9,tag_matching_port,OutputTuple,tag_matching>::type { | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<5,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<6,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<7,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<8,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| typedef typename std::tuple_element<5, OutputTuple>::type T5; | | typedef typename std::tuple_element<5, OutputTuple>::type T5; | |
| typedef typename std::tuple_element<6, OutputTuple>::type T6; | | typedef typename std::tuple_element<6, OutputTuple>::type T6; | |
| typedef typename std::tuple_element<7, OutputTuple>::type T7; | | typedef typename std::tuple_element<7, OutputTuple>::type T7; | |
| typedef typename std::tuple_element<8, OutputTuple>::type T8; | | typedef typename std::tuple_element<8, OutputTuple>::type T8; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<9, tag_matching_port, OutputTu | |
| rt<T1>, tag_matching_port<T2>, | | ple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4>, tag_matching_ | | | |
| port<T5>, tag_matching_port<T6>, | | | |
| tag_matching_port<T7>, tag_matching_port<T8> > input_ports_ | | | |
| type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename internal::function_body<T5, tag_value> *f5_p; | | typedef typename internal::function_body<T5, tag_value> *f5_p; | |
| typedef typename internal::function_body<T6, tag_value> *f6_p; | | typedef typename internal::function_body<T6, tag_value> *f6_p; | |
| | | | |
| skipping to change at line 1630 | | skipping to change at line 1338 | |
| new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | | new internal::function_body_leaf<T2, tag_value, B2>(b2)
, | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | | new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | |
| new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | | new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | |
| new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | | new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | |
| new internal::function_body_leaf<T7, tag_value, B7>(b7)
, | | new internal::function_body_leaf<T7, tag_value, B7>(b7)
, | |
| new internal::function_body_leaf<T8, tag_value, B8>(b8) | | new internal::function_body_leaf<T8, tag_value, B8>(b8) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
|
| | | #if __TBB_VARIADIC_MAX >= 10 | |
| template<typename OutputTuple> | | template<typename OutputTuple> | |
|
| class unfolded_join_node<10,tag_matching_port,OutputTuple,tag_matching> | | class unfolded_join_node<10,tag_matching_port,OutputTuple,tag_matching> | |
| : public internal::join_node_base<tag_matching, | | : public | |
| std::tuple< | | join_base<10,tag_matching_port,OutputTuple,tag_matching>::type | |
| tag_matching_port<typename std::tuple_element<0,OutputTuple | | { | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<1,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<2,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<3,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<4,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<5,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<6,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<7,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<8,OutputTuple | | | |
| >::type>, | | | |
| tag_matching_port<typename std::tuple_element<9,OutputTuple | | | |
| >::type> | | | |
| >, OutputTuple > | | | |
| { | | | |
| typedef typename std::tuple_element<0, OutputTuple>::type T0; | | typedef typename std::tuple_element<0, OutputTuple>::type T0; | |
| typedef typename std::tuple_element<1, OutputTuple>::type T1; | | typedef typename std::tuple_element<1, OutputTuple>::type T1; | |
| typedef typename std::tuple_element<2, OutputTuple>::type T2; | | typedef typename std::tuple_element<2, OutputTuple>::type T2; | |
| typedef typename std::tuple_element<3, OutputTuple>::type T3; | | typedef typename std::tuple_element<3, OutputTuple>::type T3; | |
| typedef typename std::tuple_element<4, OutputTuple>::type T4; | | typedef typename std::tuple_element<4, OutputTuple>::type T4; | |
| typedef typename std::tuple_element<5, OutputTuple>::type T5; | | typedef typename std::tuple_element<5, OutputTuple>::type T5; | |
| typedef typename std::tuple_element<6, OutputTuple>::type T6; | | typedef typename std::tuple_element<6, OutputTuple>::type T6; | |
| typedef typename std::tuple_element<7, OutputTuple>::type T7; | | typedef typename std::tuple_element<7, OutputTuple>::type T7; | |
| typedef typename std::tuple_element<8, OutputTuple>::type T8; | | typedef typename std::tuple_element<8, OutputTuple>::type T8; | |
| typedef typename std::tuple_element<9, OutputTuple>::type T9; | | typedef typename std::tuple_element<9, OutputTuple>::type T9; | |
| public: | | public: | |
|
| typedef typename std::tuple< tag_matching_port<T0>, tag_matching_po | | typedef typename wrap_tuple_elements<10, tag_matching_port, OutputT | |
| rt<T1>, tag_matching_port<T2>, | | uple>::type input_ports_type; | |
| tag_matching_port<T3>, tag_matching_port<T4>, tag_matching_ | | | |
| port<T5>, tag_matching_port<T6>, | | | |
| tag_matching_port<T7>, tag_matching_port<T8>, tag_matching_ | | | |
| port<T9> > input_ports_type; | | | |
| typedef OutputTuple output_type; | | typedef OutputTuple output_type; | |
| private: | | private: | |
| typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | | typedef join_node_base<tag_matching, input_ports_type, output_type
> base_type; | |
| typedef typename internal::function_body<T0, tag_value> *f0_p; | | typedef typename internal::function_body<T0, tag_value> *f0_p; | |
| typedef typename internal::function_body<T1, tag_value> *f1_p; | | typedef typename internal::function_body<T1, tag_value> *f1_p; | |
| typedef typename internal::function_body<T2, tag_value> *f2_p; | | typedef typename internal::function_body<T2, tag_value> *f2_p; | |
| typedef typename internal::function_body<T3, tag_value> *f3_p; | | typedef typename internal::function_body<T3, tag_value> *f3_p; | |
| typedef typename internal::function_body<T4, tag_value> *f4_p; | | typedef typename internal::function_body<T4, tag_value> *f4_p; | |
| typedef typename internal::function_body<T5, tag_value> *f5_p; | | typedef typename internal::function_body<T5, tag_value> *f5_p; | |
| typedef typename internal::function_body<T6, tag_value> *f6_p; | | typedef typename internal::function_body<T6, tag_value> *f6_p; | |
| | | | |
| skipping to change at line 1691 | | skipping to change at line 1387 | |
| new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | | new internal::function_body_leaf<T3, tag_value, B3>(b3)
, | |
| new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | | new internal::function_body_leaf<T4, tag_value, B4>(b4)
, | |
| new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | | new internal::function_body_leaf<T5, tag_value, B5>(b5)
, | |
| new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | | new internal::function_body_leaf<T6, tag_value, B6>(b6)
, | |
| new internal::function_body_leaf<T7, tag_value, B7>(b7)
, | | new internal::function_body_leaf<T7, tag_value, B7>(b7)
, | |
| new internal::function_body_leaf<T8, tag_value, B8>(b8)
, | | new internal::function_body_leaf<T8, tag_value, B8>(b8)
, | |
| new internal::function_body_leaf<T9, tag_value, B9>(b9) | | new internal::function_body_leaf<T9, tag_value, B9>(b9) | |
| ) ) {} | | ) ) {} | |
| unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | | unfolded_join_node(const unfolded_join_node &other) : base_type(oth
er) {} | |
| }; | | }; | |
|
| | | #endif | |
| | | | |
| //! templated function to refer to input ports of the join node | | //! templated function to refer to input ports of the join node | |
| template<size_t N, typename JNT> | | template<size_t N, typename JNT> | |
| typename std::tuple_element<N, typename JNT::input_ports_type>::type &i
nput_port(JNT &jn) { | | typename std::tuple_element<N, typename JNT::input_ports_type>::type &i
nput_port(JNT &jn) { | |
| return std::get<N>(jn.input_ports()); | | return std::get<N>(jn.input_ports()); | |
| } | | } | |
| | | | |
| } | | } | |
|
| | | | |
| #endif // __TBB__flow_graph_join_impl_H | | #endif // __TBB__flow_graph_join_impl_H | |
| | | | |
End of changes. 35 change blocks. |
| 476 lines changed or deleted | | 72 lines changed or added | |
|
| tuple | | tuple | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| #ifndef __TBB_tuple_H | | #ifndef __TBB_tuple_H | |
| #define __TBB_tuple_H | | #define __TBB_tuple_H | |
| | | | |
| #if !TBB_PREVIEW_TUPLE | | #if !TBB_PREVIEW_TUPLE | |
| #error Set TBB_PREVIEW_TUPLE to include compat/tuple | | #error Set TBB_PREVIEW_TUPLE to include compat/tuple | |
| #endif | | #endif | |
| | | | |
| #include <utility> | | #include <utility> | |
| #include "../tbb_stddef.h" | | #include "../tbb_stddef.h" | |
| | | | |
|
| | | // build preprocessor variables for varying number of arguments | |
| | | // Need the leading comma so the empty __TBB_T_PACK will not cause a syntax | |
| | | error. | |
| | | #if __TBB_VARIADIC_MAX <= 5 | |
| | | #define __TBB_T_PACK | |
| | | #define __TBB_U_PACK | |
| | | #define __TBB_CLASS_T_PACK | |
| | | #define __TBB_CLASS_U_PACK | |
| | | #define __TBB_NULL_TYPE_PACK | |
| | | #define __TBB_REF_T_PARAM_PACK | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK | |
| | | #define __TBB_T_PARAM_LIST_PACK | |
| | | #define __TBB_CONST_NULL_REF_PACK | |
| | | // | |
| | | #elif __TBB_VARIADIC_MAX == 6 | |
| | | #define __TBB_T_PACK ,T5 | |
| | | #define __TBB_U_PACK ,U5 | |
| | | #define __TBB_CLASS_T_PACK , class T5 | |
| | | #define __TBB_CLASS_U_PACK , class U5 | |
| | | #define __TBB_NULL_TYPE_PACK , null_type | |
| | | #define __TBB_REF_T_PARAM_PACK ,T5& t5 | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK ,const T5& t5 | |
| | | #define __TBB_T_PARAM_LIST_PACK ,t5 | |
| | | #define __TBB_CONST_NULL_REF_PACK , const null_type& | |
| | | // | |
| | | #elif __TBB_VARIADIC_MAX == 7 | |
| | | #define __TBB_T_PACK ,T5, T6 | |
| | | #define __TBB_U_PACK ,U5, U6 | |
| | | #define __TBB_CLASS_T_PACK , class T5 , class T6 | |
| | | #define __TBB_CLASS_U_PACK , class U5 , class U6 | |
| | | #define __TBB_NULL_TYPE_PACK , null_type, null_type | |
| | | #define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6 | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK ,const T5& t5, const T6& t6 | |
| | | #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 | |
| | | #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type& | |
| | | // | |
| | | #elif __TBB_VARIADIC_MAX == 8 | |
| | | #define __TBB_T_PACK ,T5, T6, T7 | |
| | | #define __TBB_U_PACK ,U5, U6, U7 | |
| | | #define __TBB_CLASS_T_PACK , class T5 , class T6, class T7 | |
| | | #define __TBB_CLASS_U_PACK , class U5 , class U6, class U7 | |
| | | #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type | |
| | | #define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7 | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7 | |
| | | & t7 | |
| | | #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 | |
| | | #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, con | |
| | | st null_type& | |
| | | // | |
| | | #elif __TBB_VARIADIC_MAX == 9 | |
| | | #define __TBB_T_PACK ,T5, T6, T7, T8 | |
| | | #define __TBB_U_PACK ,U5, U6, U7, U8 | |
| | | #define __TBB_CLASS_T_PACK , class T5, class T6, class T7, class T8 | |
| | | #define __TBB_CLASS_U_PACK , class U5, class U6, class U7, class U8 | |
| | | #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type | |
| | | #define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7, T8& t8 | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7 | |
| | | & t7, const T8& t8 | |
| | | #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 | |
| | | #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, con | |
| | | st null_type&, const null_type& | |
| | | // | |
| | | #elif __TBB_VARIADIC_MAX >= 10 | |
| | | #define __TBB_T_PACK ,T5, T6, T7, T8, T9 | |
| | | #define __TBB_U_PACK ,U5, U6, U7, U8, U9 | |
| | | #define __TBB_CLASS_T_PACK , class T5, class T6, class T7, class T8, class | |
| | | T9 | |
| | | #define __TBB_CLASS_U_PACK , class U5, class U6, class U7, class U8, class | |
| | | U9 | |
| | | #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type, | |
| | | null_type | |
| | | #define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7, T8& t8, T9& t9 | |
| | | #define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7 | |
| | | & t7, const T8& t8, const T9& t9 | |
| | | #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 ,t9 | |
| | | #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, con | |
| | | st null_type&, const null_type&, const null_type& | |
| | | #endif | |
| | | | |
| namespace tbb { | | namespace tbb { | |
| namespace interface5 { | | namespace interface5 { | |
| namespace internal { | | namespace internal { | |
| struct null_type { }; | | struct null_type { }; | |
| } | | } | |
| using internal::null_type; | | using internal::null_type; | |
| | | | |
| // tuple forward declaration | | // tuple forward declaration | |
|
| template <class T0=null_type, class T1=null_type, class T2=null_type, class | | template <class T0=null_type, class T1=null_type, class T2=null_type, class | |
| T3=null_type, class T4=null_type, class T5=null_type, class T6=null_type, | | T3=null_type, class T4=null_type | |
| class T7=null_type, class T8=null_type, class T9=null_type> | | #if __TBB_VARIADIC_MAX >= 6 | |
| | | , class T5=null_type | |
| | | #if __TBB_VARIADIC_MAX >= 7 | |
| | | , class T6=null_type | |
| | | #if __TBB_VARIADIC_MAX >= 8 | |
| | | , class T7=null_type | |
| | | #if __TBB_VARIADIC_MAX >= 9 | |
| | | , class T8=null_type | |
| | | #if __TBB_VARIADIC_MAX >= 10 | |
| | | , class T9=null_type | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| | | > | |
| class tuple; | | class tuple; | |
| | | | |
| namespace internal { | | namespace internal { | |
| | | | |
| // const null_type temp | | // const null_type temp | |
| inline const null_type cnull() { return null_type(); } | | inline const null_type cnull() { return null_type(); } | |
| | | | |
| // cons forward declaration | | // cons forward declaration | |
| template <class HT, class TT> struct cons; | | template <class HT, class TT> struct cons; | |
| | | | |
| | | | |
| skipping to change at line 116 | | skipping to change at line 201 | |
| inline static typename component<0, cons<HT,TT> >::type& get(cons<HT,TT>& t
i) { | | inline static typename component<0, cons<HT,TT> >::type& get(cons<HT,TT>& t
i) { | |
| return ti.head; | | return ti.head; | |
| } | | } | |
| template<class HT, class TT> | | template<class HT, class TT> | |
| inline static typename component<0, cons<HT,TT> >::type const& get(const co
ns<HT,TT>& ti) { | | inline static typename component<0, cons<HT,TT> >::type const& get(const co
ns<HT,TT>& ti) { | |
| return ti.head; | | return ti.head; | |
| } | | } | |
| }; | | }; | |
| | | | |
| // traits adaptor | | // traits adaptor | |
|
| template <class T0, class T1, class T2, class T3, class T4, class T5, class
T6, class T7, class T8, class T9> | | template <class T0, class T1, class T2, class T3, class T4 __TBB_CLASS_T_PA
CK> | |
| struct tuple_traits { | | struct tuple_traits { | |
|
| typedef cons <T0, typename tuple_traits<T1, T2, T3, T4, T5, T6, T7, T8,
T9, null_type>::U > U; | | typedef cons <T0, typename tuple_traits<T1, T2, T3, T4 __TBB_T_PACK , n
ull_type>::U > U; | |
| }; | | }; | |
| | | | |
| template <> | | template <> | |
|
| struct tuple_traits<class T0, null_type, null_type, null_type, null_type, n
ull_type, null_type, null_type, null_type, null_type> { | | struct tuple_traits<class T0, null_type, null_type, null_type, null_type __
TBB_NULL_TYPE_PACK > { | |
| typedef cons<T0, null_type> U; | | typedef cons<T0, null_type> U; | |
| }; | | }; | |
| | | | |
| template<> | | template<> | |
|
| struct tuple_traits<null_type, null_type, null_type, null_type, null_type,
null_type, null_type, null_type, null_type, null_type> { | | struct tuple_traits<null_type, null_type, null_type, null_type, null_type _
_TBB_NULL_TYPE_PACK > { | |
| typedef null_type U; | | typedef null_type U; | |
| }; | | }; | |
| | | | |
| // core cons defs | | // core cons defs | |
| template <class HT, class TT> | | template <class HT, class TT> | |
| struct cons{ | | struct cons{ | |
| | | | |
| typedef HT head_type; | | typedef HT head_type; | |
| typedef TT tail_type; | | typedef TT tail_type; | |
| | | | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 234 | |
| TT tail; | | TT tail; | |
| | | | |
| static const int length = 1 + tail_type::length; | | static const int length = 1 + tail_type::length; | |
| | | | |
| // default constructors | | // default constructors | |
| explicit cons() : head(), tail() { } | | explicit cons() : head(), tail() { } | |
| | | | |
| // non-default constructors | | // non-default constructors | |
| cons(head_type& h, const tail_type& t) : head(h), tail(t) { } | | cons(head_type& h, const tail_type& t) : head(h), tail(t) { } | |
| | | | |
|
| template <class T0, class T1, class T2, class T3, class T4, class T5, c | | template <class T0, class T1, class T2, class T3, class T4 __TBB_CLASS_ | |
| lass T6, class T7, class T8, class T9> | | T_PACK > | |
| cons(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& | | cons(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& | |
| t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) : | | t4 __TBB_CONST_REF_T_PARAM_PACK) : | |
| head(t0), tail(t1, t2, t3, t4, t5, t6, t7, t8, t9, cnull()) { } | | head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK, cnull()) { } | |
| | | | |
| template <class T0, class T1, class T2, class T3, class T4, class T5, c | | template <class T0, class T1, class T2, class T3, class T4 __TBB_CLASS_ | |
| lass T6, class T7, class T8, class T9> | | T_PACK > | |
| cons(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8 | | cons(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4 __TBB_REF_T_PARAM_PACK) : | |
| & t8, T9& t9) : | | head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK , cnull()) { | |
| head(t0), tail(t1, t2, t3, t4, t5, t6, t7, t8, t9, cnull()) { } | | } | |
| | | | |
| template <class HT1, class TT1> | | template <class HT1, class TT1> | |
| cons(const cons<HT1,TT1>& other) : head(other.head), tail(other.tail) {
} | | cons(const cons<HT1,TT1>& other) : head(other.head), tail(other.tail) {
} | |
| | | | |
| cons& operator=(const cons& other) { head = other.head; tail = other.ta
il; return *this; } | | cons& operator=(const cons& other) { head = other.head; tail = other.ta
il; return *this; } | |
| | | | |
| friend bool operator==(const cons& me, const cons& other) { | | friend bool operator==(const cons& me, const cons& other) { | |
| return me.head == other.head && me.tail == other.tail; | | return me.head == other.head && me.tail == other.tail; | |
| } | | } | |
| friend bool operator<(const cons& me, const cons& other) { | | friend bool operator<(const cons& me, const cons& other) { | |
| | | | |
| skipping to change at line 208 | | skipping to change at line 293 | |
| struct cons<HT,null_type> { | | struct cons<HT,null_type> { | |
| | | | |
| typedef HT head_type; | | typedef HT head_type; | |
| typedef null_type tail_type; | | typedef null_type tail_type; | |
| static const int length = 1; | | static const int length = 1; | |
| head_type head; | | head_type head; | |
| | | | |
| // default constructor | | // default constructor | |
| cons() : head() { /*std::cout << "default constructor 1\n";*/ } | | cons() : head() { /*std::cout << "default constructor 1\n";*/ } | |
| | | | |
|
| cons(const null_type&, const null_type&, const null_type&, const null_t
ype&, const null_type&, const null_type&, const null_type&, const null_type
&, const null_type&, const null_type&) : head() { /*std::cout << "default c
onstructor 2\n";*/ } | | cons(const null_type&, const null_type&, const null_type&, const null_t
ype&, const null_type& __TBB_CONST_NULL_REF_PACK) : head() { /*std::cout <<
"default constructor 2\n";*/ } | |
| | | | |
| // non-default constructor | | // non-default constructor | |
| template<class T1> | | template<class T1> | |
|
| cons(T1& t1, const null_type&, const null_type&, const null_type&, cons
t null_type&, const null_type&, const null_type&, const null_type&, const n
ull_type&, const null_type& ) : head(t1) { /*std::cout << "non-default a1,
t1== " << t1 << "\n";*/} | | cons(T1& t1, const null_type&, const null_type&, const null_type&, cons
t null_type& __TBB_CONST_NULL_REF_PACK) : head(t1) { /*std::cout << "non-de
fault a1, t1== " << t1 << "\n";*/} | |
| | | | |
| cons(head_type& h, const null_type& = null_type() ) : head(h) { } | | cons(head_type& h, const null_type& = null_type() ) : head(h) { } | |
|
| cons(const head_type& t0, const null_type&, const null_type&, const nul
l_type&, const null_type&, const null_type&, const null_type&, const null_t
ype&, const null_type&, const null_type&) : head(t0) { } | | cons(const head_type& t0, const null_type&, const null_type&, const nul
l_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(t0) { } | |
| | | | |
| // converting constructor | | // converting constructor | |
| template<class HT1> | | template<class HT1> | |
|
| cons(HT1 h1, const null_type&, const null_type&, const null_type&, cons
t null_type&, const null_type&, const null_type&, const null_type&, const n
ull_type&, const null_type&) : head(h1) { } | | cons(HT1 h1, const null_type&, const null_type&, const null_type&, cons
t null_type& __TBB_CONST_NULL_REF_PACK) : head(h1) { } | |
| | | | |
| // copy constructor | | // copy constructor | |
| template<class HT1> | | template<class HT1> | |
| cons( const cons<HT1, null_type>& other) : head(other.head) { } | | cons( const cons<HT1, null_type>& other) : head(other.head) { } | |
| | | | |
| // assignment operator | | // assignment operator | |
| cons& operator=(const cons& other) { head = other.head; return *this; } | | cons& operator=(const cons& other) { head = other.head; return *this; } | |
| | | | |
| friend bool operator==(const cons& me, const cons& other) { return me.h
ead == other.head; } | | friend bool operator==(const cons& me, const cons& other) { return me.h
ead == other.head; } | |
| friend bool operator<(const cons& me, const cons& other) { return me.he
ad < other.head; } | | friend bool operator<(const cons& me, const cons& other) { return me.he
ad < other.head; } | |
| | | | |
| skipping to change at line 268 | | skipping to change at line 353 | |
| | | | |
| template <> | | template <> | |
| struct cons<null_type,null_type> { typedef null_type tail_type; static cons
t int length = 0; }; | | struct cons<null_type,null_type> { typedef null_type tail_type; static cons
t int length = 0; }; | |
| | | | |
| // wrapper for default constructor | | // wrapper for default constructor | |
| template<class T> | | template<class T> | |
| inline const T wrap_dcons(T*) { return T(); } | | inline const T wrap_dcons(T*) { return T(); } | |
| } // namespace internal | | } // namespace internal | |
| | | | |
| // tuple definition | | // tuple definition | |
|
| template<class T0, class T1, class T2, class T3, class T4, class T5, class | | template<class T0, class T1, class T2, class T3, class T4 __TBB_CLASS_T_PAC | |
| T6, class T7, class T8, class T9> | | K > | |
| class tuple : public internal::tuple_traits<T0, T1, T2, T3, T4, T5, T6, T7, | | class tuple : public internal::tuple_traits<T0, T1, T2, T3, T4 __TBB_T_PACK | |
| T8, T9>::U { | | >::U { | |
| // friends | | // friends | |
| template <class T> friend class tuple_size; | | template <class T> friend class tuple_size; | |
| template<int N, class T> friend struct tuple_element; | | template<int N, class T> friend struct tuple_element; | |
| | | | |
| // stl components | | // stl components | |
|
| typedef tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> value_type; | | typedef tuple<T0,T1,T2,T3,T4 __TBB_T_PACK > value_type; | |
| typedef value_type *pointer; | | typedef value_type *pointer; | |
| typedef const value_type *const_pointer; | | typedef const value_type *const_pointer; | |
| typedef value_type &reference; | | typedef value_type &reference; | |
| typedef const value_type &const_reference; | | typedef const value_type &const_reference; | |
| typedef size_t size_type; | | typedef size_t size_type; | |
| | | | |
|
| typedef typename internal::tuple_traits<T0,T1,T2,T3, T4, T5, T6, T7, T8
, T9>::U my_cons; | | typedef typename internal::tuple_traits<T0,T1,T2,T3, T4 __TBB_T_PACK >:
:U my_cons; | |
| public: | | public: | |
| | | | |
|
| tuple(const T0& t0=internal::wrap_dcons((T0*)NULL), | | tuple(const T0& t0=internal::wrap_dcons((T0*)NULL) | |
| const T1& t1=internal::wrap_dcons((T1*)NULL), | | ,const T1& t1=internal::wrap_dcons((T1*)NULL) | |
| const T2& t2=internal::wrap_dcons((T2*)NULL), | | ,const T2& t2=internal::wrap_dcons((T2*)NULL) | |
| const T3& t3=internal::wrap_dcons((T3*)NULL), | | ,const T3& t3=internal::wrap_dcons((T3*)NULL) | |
| const T4& t4=internal::wrap_dcons((T4*)NULL), | | ,const T4& t4=internal::wrap_dcons((T4*)NULL) | |
| const T5& t5=internal::wrap_dcons((T5*)NULL), | | #if __TBB_VARIADIC_MAX >= 6 | |
| const T6& t6=internal::wrap_dcons((T6*)NULL), | | ,const T5& t5=internal::wrap_dcons((T5*)NULL) | |
| const T7& t7=internal::wrap_dcons((T7*)NULL), | | #if __TBB_VARIADIC_MAX >= 7 | |
| const T8& t8=internal::wrap_dcons((T8*)NULL), | | ,const T6& t6=internal::wrap_dcons((T6*)NULL) | |
| const T9& t9=internal::wrap_dcons((T9*)NULL) | | #if __TBB_VARIADIC_MAX >= 8 | |
| | | ,const T7& t7=internal::wrap_dcons((T7*)NULL) | |
| | | #if __TBB_VARIADIC_MAX >= 9 | |
| | | ,const T8& t8=internal::wrap_dcons((T8*)NULL) | |
| | | #if __TBB_VARIADIC_MAX >= 10 | |
| | | ,const T9& t9=internal::wrap_dcons((T9*)NULL) | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| | | #endif | |
| ) : | | ) : | |
|
| internal::tuple_traits<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::U(t0,t1,t2,t
3,t4,t5,t6,t7,t8,t9) { } | | internal::tuple_traits<T0,T1,T2,T3,T4 __TBB_T_PACK >::U(t0,t1,t2,t3
,t4 __TBB_T_PARAM_LIST_PACK) { } | |
| | | | |
| template<int N> | | template<int N> | |
| struct internal_tuple_element { | | struct internal_tuple_element { | |
| typedef typename internal::component<N,my_cons>::type type; | | typedef typename internal::component<N,my_cons>::type type; | |
| }; | | }; | |
| | | | |
| template<int N> | | template<int N> | |
| typename internal_tuple_element<N>::type& get() { return internal::get_
helper<N>::get(*this); } | | typename internal_tuple_element<N>::type& get() { return internal::get_
helper<N>::get(*this); } | |
| | | | |
| template<int N> | | template<int N> | |
| | | | |
| skipping to change at line 330 | | skipping to change at line 425 | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
| friend bool operator==(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)==(other);} | | friend bool operator==(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)==(other);} | |
| friend bool operator<(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)<(other);} | | friend bool operator<(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)<(other);} | |
| friend bool operator>(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)>(other);} | | friend bool operator>(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)>(other);} | |
| friend bool operator!=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)!=(other);} | | friend bool operator!=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)!=(other);} | |
| friend bool operator>=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)>=(other);} | | friend bool operator>=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)>=(other);} | |
| friend bool operator<=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)<=(other);} | | friend bool operator<=(const tuple& me, const tuple& other) {return sta
tic_cast<const my_cons &>(me)<=(other);} | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator==(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U | | friend bool operator==(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TB | |
| 6,U7,U8,U9>& other) { | | B_U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)==(other); | | return static_cast<const my_cons &>(me)==(other); | |
| } | | } | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator<(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U6 | | friend bool operator<(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TBB | |
| ,U7,U8,U9>& other) { | | _U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)<(other); | | return static_cast<const my_cons &>(me)<(other); | |
| } | | } | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator>(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U6 | | friend bool operator>(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TBB | |
| ,U7,U8,U9>& other) { | | _U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)>(other); | | return static_cast<const my_cons &>(me)>(other); | |
| } | | } | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator!=(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U | | friend bool operator!=(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TB | |
| 6,U7,U8,U9>& other) { | | B_U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)!=(other); | | return static_cast<const my_cons &>(me)!=(other); | |
| } | | } | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator>=(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U | | friend bool operator>=(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TB | |
| 6,U7,U8,U9>& other) { | | B_U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)>=(other); | | return static_cast<const my_cons &>(me)>=(other); | |
| } | | } | |
| | | | |
|
| template<class U0, class U1, class U2, class U3, class U4, class U5, cl | | template<class U0, class U1, class U2, class U3, class U4 __TBB_CLASS_U | |
| ass U6, class U7, class U8, class U9> | | _PACK > | |
| friend bool operator<=(const tuple& me, const tuple<U0,U1,U2,U3,U4,U5,U | | friend bool operator<=(const tuple& me, const tuple<U0,U1,U2,U3,U4 __TB | |
| 6,U7,U8,U9>& other) { | | B_U_PACK >& other) { | |
| return static_cast<const my_cons &>(me)<=(other); | | return static_cast<const my_cons &>(me)<=(other); | |
| } | | } | |
| | | | |
| }; // tuple | | }; // tuple | |
| | | | |
| // empty tuple | | // empty tuple | |
| template<> | | template<> | |
|
| class tuple<null_type, null_type, null_type, null_type, null_type, null_typ
e, null_type, null_type, null_type, null_type> : public null_type { | | class tuple<null_type, null_type, null_type, null_type, null_type __TBB_NUL
L_TYPE_PACK > : public null_type { | |
| typedef null_type inherited; | | typedef null_type inherited; | |
| }; | | }; | |
| | | | |
| // helper classes | | // helper classes | |
| | | | |
| template < class T> | | template < class T> | |
| class tuple_size { | | class tuple_size { | |
| public: | | public: | |
| static const size_t value = 1 + tuple_size<typename T::tail_type>::valu
e; | | static const size_t value = 1 + tuple_size<typename T::tail_type>::valu
e; | |
| }; | | }; | |
| | | | |
| skipping to change at line 393 | | skipping to change at line 488 | |
| class tuple_size<null_type> { | | class tuple_size<null_type> { | |
| public: | | public: | |
| static const size_t value = 0; | | static const size_t value = 0; | |
| }; | | }; | |
| | | | |
| template<int N, class T> | | template<int N, class T> | |
| struct tuple_element { | | struct tuple_element { | |
| typedef typename internal::component<N, typename T::my_cons>::type type
; | | typedef typename internal::component<N, typename T::my_cons>::type type
; | |
| }; | | }; | |
| | | | |
|
| template<int N, class T0, class T1, class T2, class T3, class T4, class T5, | | template<int N, class T0, class T1, class T2, class T3, class T4 __TBB_CLAS | |
| class T6, class T7, class T8, class T9> | | S_T_PACK > | |
| inline static typename tuple_element<N,tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> | | inline static typename tuple_element<N,tuple<T0,T1,T2,T3,T4 __TBB_T_PACK > | |
| >::type& | | >::type& | |
| get(tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>& t) { return t.get<N>(); } | | get(tuple<T0,T1,T2,T3,T4 __TBB_T_PACK >& t) { return t.get<N>(); } | |
| | | | |
| template<int N, class T0, class T1, class T2, class T3, class T4, class T5, | | template<int N, class T0, class T1, class T2, class T3, class T4 __TBB_CLAS | |
| class T6, class T7, class T8, class T9> | | S_T_PACK > | |
| inline static typename tuple_element<N,tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> | | inline static typename tuple_element<N,tuple<T0,T1,T2,T3,T4 __TBB_T_PACK > | |
| >::type const& | | >::type const& | |
| get(const tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>& t) { return t.get<N>(); | | get(const tuple<T0,T1,T2,T3,T4 __TBB_T_PACK >& t) { return t.get<N>(); | |
| } | | } | |
| | | | |
| } // interface5 | | } // interface5 | |
| } // tbb | | } // tbb | |
| | | | |
| #if TBB_IMPLEMENT_CPP0X | | #if TBB_IMPLEMENT_CPP0X | |
| namespace std { | | namespace std { | |
| using tbb::interface5::tuple; | | using tbb::interface5::tuple; | |
| using tbb::interface5::tuple_size; | | using tbb::interface5::tuple_size; | |
| using tbb::interface5::tuple_element; | | using tbb::interface5::tuple_element; | |
| using tbb::interface5::get; | | using tbb::interface5::get; | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| | | #undef __TBB_T_PACK | |
| | | #undef __TBB_U_PACK | |
| | | #undef __TBB_CLASS_T_PACK | |
| | | #undef __TBB_CLASS_U_PACK | |
| | | #undef __TBB_NULL_TYPE_PACK | |
| | | #undef __TBB_REF_T_PARAM_PACK | |
| | | #undef __TBB_CONST_REF_T_PARAM_PACK | |
| | | #undef __TBB_T_PARAM_LIST_PACK | |
| | | #undef __TBB_CONST_NULL_REF_PACK | |
| | | | |
| #endif /* __TBB_tuple_H */ | | #endif /* __TBB_tuple_H */ | |
| | | | |
End of changes. 25 change blocks. |
| 76 lines changed or deleted | | 190 lines changed or added | |
|