_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


 _flow_graph_types_impl.h   _flow_graph_types_impl.h 
skipping to change at line 87 skipping to change at line 87
struct wrap_tuple_elements<5, PT, TypeTuple> { struct wrap_tuple_elements<5, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type> > PT<typename std::tuple_element<4,TypeTuple>::type> >
type; type;
}; };
#if __TBB_VARIADIC_MAX >= 6
template<template<class> class PT, typename TypeTuple> template<template<class> class PT, typename TypeTuple>
struct wrap_tuple_elements<6, PT, TypeTuple> { struct wrap_tuple_elements<6, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type>, PT<typename std::tuple_element<4,TypeTuple>::type>,
PT<typename std::tuple_element<5,TypeTuple>::type> > PT<typename std::tuple_element<5,TypeTuple>::type> >
type; type;
}; };
#endif
#if __TBB_VARIADIC_MAX >= 7
template<template<class> class PT, typename TypeTuple> template<template<class> class PT, typename TypeTuple>
struct wrap_tuple_elements<7, PT, TypeTuple> { struct wrap_tuple_elements<7, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type>, PT<typename std::tuple_element<4,TypeTuple>::type>,
PT<typename std::tuple_element<5,TypeTuple>::type>, PT<typename std::tuple_element<5,TypeTuple>::type>,
PT<typename std::tuple_element<6,TypeTuple>::type> > PT<typename std::tuple_element<6,TypeTuple>::type> >
type; type;
}; };
#endif
#if __TBB_VARIADIC_MAX >= 8
template<template<class> class PT, typename TypeTuple> template<template<class> class PT, typename TypeTuple>
struct wrap_tuple_elements<8, PT, TypeTuple> { struct wrap_tuple_elements<8, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type>, PT<typename std::tuple_element<4,TypeTuple>::type>,
PT<typename std::tuple_element<5,TypeTuple>::type>, PT<typename std::tuple_element<5,TypeTuple>::type>,
PT<typename std::tuple_element<6,TypeTuple>::type>, PT<typename std::tuple_element<6,TypeTuple>::type>,
PT<typename std::tuple_element<7,TypeTuple>::type> > PT<typename std::tuple_element<7,TypeTuple>::type> >
type; type;
}; };
#endif
#if __TBB_VARIADIC_MAX >= 9
template<template<class> class PT, typename TypeTuple> template<template<class> class PT, typename TypeTuple>
struct wrap_tuple_elements<9, PT, TypeTuple> { struct wrap_tuple_elements<9, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type>, PT<typename std::tuple_element<4,TypeTuple>::type>,
PT<typename std::tuple_element<5,TypeTuple>::type>, PT<typename std::tuple_element<5,TypeTuple>::type>,
PT<typename std::tuple_element<6,TypeTuple>::type>, PT<typename std::tuple_element<6,TypeTuple>::type>,
PT<typename std::tuple_element<7,TypeTuple>::type>, PT<typename std::tuple_element<7,TypeTuple>::type>,
PT<typename std::tuple_element<8,TypeTuple>::type> > PT<typename std::tuple_element<8,TypeTuple>::type> >
type; type;
}; };
#endif
#if __TBB_VARIADIC_MAX >= 10
template<template<class> class PT, typename TypeTuple> template<template<class> class PT, typename TypeTuple>
struct wrap_tuple_elements<10, PT, TypeTuple> { struct wrap_tuple_elements<10, PT, TypeTuple> {
typedef typename std::tuple< typedef typename std::tuple<
PT<typename std::tuple_element<0,TypeTuple>::type>, PT<typename std::tuple_element<0,TypeTuple>::type>,
PT<typename std::tuple_element<1,TypeTuple>::type>, PT<typename std::tuple_element<1,TypeTuple>::type>,
PT<typename std::tuple_element<2,TypeTuple>::type>, PT<typename std::tuple_element<2,TypeTuple>::type>,
PT<typename std::tuple_element<3,TypeTuple>::type>, PT<typename std::tuple_element<3,TypeTuple>::type>,
PT<typename std::tuple_element<4,TypeTuple>::type>, PT<typename std::tuple_element<4,TypeTuple>::type>,
PT<typename std::tuple_element<5,TypeTuple>::type>, PT<typename std::tuple_element<5,TypeTuple>::type>,
PT<typename std::tuple_element<6,TypeTuple>::type>, PT<typename std::tuple_element<6,TypeTuple>::type>,
PT<typename std::tuple_element<7,TypeTuple>::type>, PT<typename std::tuple_element<7,TypeTuple>::type>,
PT<typename std::tuple_element<8,TypeTuple>::type>, PT<typename std::tuple_element<8,TypeTuple>::type>,
PT<typename std::tuple_element<9,TypeTuple>::type> > PT<typename std::tuple_element<9,TypeTuple>::type> >
type; type;
}; };
#endif
} // namespace internal } // namespace internal
#endif /* __TBB__flow_graph_types_impl_H */ #endif /* __TBB__flow_graph_types_impl_H */
 End of changes. 10 change blocks. 
0 lines changed or deleted 10 lines changed or added


 _tbb_windef.h   _tbb_windef.h 
skipping to change at line 65 skipping to change at line 65
# if !defined(_DEBUG) # if !defined(_DEBUG)
# pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warnin g: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0") # pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warnin g: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0")
# endif # endif
# else # else
# if defined(_DEBUG) # if defined(_DEBUG)
# pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warnin g: Recommend using /MD if compiling with TBB_USE_DEBUG==0") # pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warnin g: Recommend using /MD if compiling with TBB_USE_DEBUG==0")
# endif # endif
# endif # endif
#endif #endif
#if __TBB_BUILD && !defined(__TBB_NO_IMPLICIT_LINKAGE) #if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBB_NO_IMPLICIT_LINKAG E)
#define __TBB_NO_IMPLICIT_LINKAGE 1 #define __TBB_NO_IMPLICIT_LINKAGE 1
#endif #endif
#if _MSC_VER #if _MSC_VER
#if !__TBB_NO_IMPLICIT_LINKAGE #if !__TBB_NO_IMPLICIT_LINKAGE
#ifdef __TBB_LIB_NAME #ifdef __TBB_LIB_NAME
#pragma comment(lib, __TBB_STRING(__TBB_LIB_NAME)) #pragma comment(lib, __TBB_STRING(__TBB_LIB_NAME))
#else #else
#ifdef _DEBUG #ifdef _DEBUG
#pragma comment(lib, "tbb_debug.lib") #pragma comment(lib, "tbb_debug.lib")
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 condition_variable   condition_variable 
skipping to change at line 412 skipping to change at line 412
req.tv_nsec += static_cast<long>( (sec - static_cast<long>(sec))*1e9 ); req.tv_nsec += static_cast<long>( (sec - static_cast<long>(sec))*1e9 );
#else /* generic Unix */ #else /* generic Unix */
struct timeval tv; struct timeval tv;
struct timespec req; struct timespec req;
double sec = i.seconds(); double sec = i.seconds();
int status = gettimeofday(&tv, NULL); int status = gettimeofday(&tv, NULL);
__TBB_ASSERT_EX( status==0, "gettimeofday failed" ); __TBB_ASSERT_EX( status==0, "gettimeofday failed" );
req.tv_sec = tv.tv_sec + static_cast<long>(sec); req.tv_sec = tv.tv_sec + static_cast<long>(sec);
req.tv_nsec = tv.tv_usec*1000 + static_cast<long>( (sec - static_cast<l ong>(sec))*1e9 ); req.tv_nsec = tv.tv_usec*1000 + static_cast<long>( (sec - static_cast<l ong>(sec))*1e9 );
#endif /*(choice of OS) */ #endif /*(choice of OS) */
if( req.tv_nsec>=1e9 ) {
req.tv_sec += 1;
req.tv_nsec -= static_cast<long int>(1e9);
}
__TBB_ASSERT( 0<=req.tv_nsec && req.tv_nsec<1e9, NULL );
int ec; int ec;
cv_status rc = no_timeout; cv_status rc = no_timeout;
__TBB_ASSERT( lock.owns, NULL ); __TBB_ASSERT( lock.owns, NULL );
lock.owns = false; lock.owns = false;
if( ( ec=pthread_cond_timedwait( &my_cv, lock.mutex()->native_handle(), &req ) ) ) { if( ( ec=pthread_cond_timedwait( &my_cv, lock.mutex()->native_handle(), &req ) ) ) {
if( ec==ETIMEDOUT ) if( ec==ETIMEDOUT )
rc = timeout; rc = timeout;
else { else {
__TBB_ASSERT( lock.try_lock()==false, NULL ); __TBB_ASSERT( lock.try_lock()==false, NULL );
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 flow_graph.h   flow_graph.h 
skipping to change at line 480 skipping to change at line 480
graph_node *next, *prev; graph_node *next, *prev;
public: public:
graph_node(graph& g) : my_graph(g) { graph_node(graph& g) : my_graph(g) {
my_graph.register_node(this); my_graph.register_node(this);
} }
virtual ~graph_node() { virtual ~graph_node() {
my_graph.remove_node(this); my_graph.remove_node(this);
} }
}; };
void graph::register_node(graph_node *n) { inline void graph::register_node(graph_node *n) {
n->next = NULL; n->next = NULL;
{ {
spin_mutex::scoped_lock lock(nodelist_mutex); spin_mutex::scoped_lock lock(nodelist_mutex);
n->prev = my_nodes_last; n->prev = my_nodes_last;
if (my_nodes_last) my_nodes_last->next = n; if (my_nodes_last) my_nodes_last->next = n;
my_nodes_last = n; my_nodes_last = n;
if (!my_nodes) my_nodes = n; if (!my_nodes) my_nodes = n;
} }
} }
void graph::remove_node(graph_node *n) { inline void graph::remove_node(graph_node *n) {
{ {
spin_mutex::scoped_lock lock(nodelist_mutex); spin_mutex::scoped_lock lock(nodelist_mutex);
__TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes"); __TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes");
if (n->prev) n->prev->next = n->next; if (n->prev) n->prev->next = n->next;
if (n->next) n->next->prev = n->prev; if (n->next) n->next->prev = n->prev;
if (my_nodes_last == n) my_nodes_last = n->prev; if (my_nodes_last == n) my_nodes_last = n->prev;
if (my_nodes == n) my_nodes = n->next; if (my_nodes == n) my_nodes = n->next;
} }
n->prev = n->next = NULL; n->prev = n->next = NULL;
} }
skipping to change at line 1685 skipping to change at line 1685
typedef OutputTuple output_type; typedef OutputTuple output_type;
typedef typename unfolded_type::input_ports_type input_ports_type; typedef typename unfolded_type::input_ports_type input_ports_type;
template<typename B0, typename B1> template<typename B0, typename B1>
join_node(graph &g, B0 b0, B1 b1) : unfolded_type(g, b0, b1) { } join_node(graph &g, B0 b0, B1 b1) : unfolded_type(g, b0, b1) { }
template<typename B0, typename B1, typename B2> template<typename B0, typename B1, typename B2>
join_node(graph &g, B0 b0, B1 b1, B2 b2) : unfolded_type(g, b0, b1, b2) { } join_node(graph &g, B0 b0, B1 b1, B2 b2) : unfolded_type(g, b0, b1, b2) { }
template<typename B0, typename B1, typename B2, typename B3> template<typename B0, typename B1, typename B2, typename B3>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3) : unfolded_type(g, b0, b1, b2, b3) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3) : unfolded_type(g, b0, b1, b2, b3) { }
template<typename B0, typename B1, typename B2, typename B3, typename B 4> template<typename B0, typename B1, typename B2, typename B3, typename B 4>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : unfolded_type( g, b0, b1, b2, b3, b4) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : unfolded_type( g, b0, b1, b2, b3, b4) { }
#if __TBB_VARIADIC_MAX >= 6
template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5> template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) : unfolde d_type(g, b0, b1, b2, b3, b4, b5) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) : unfolde d_type(g, b0, b1, b2, b3, b4, b5) { }
#endif
#if __TBB_VARIADIC_MAX >= 7
template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6> template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6) { }
#endif
#if __TBB_VARIADIC_MAX >= 8
template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7> template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) { }
#endif
#if __TBB_VARIADIC_MAX >= 9
template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7, typename B8> template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7, typename B8>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) { }
#endif
#if __TBB_VARIADIC_MAX >= 10
template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7, typename B8, typename B9> template<typename B0, typename B1, typename B2, typename B3, typename B 4, typename B5, typename B6, typename B7, typename B8, typename B9>
join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b 9) { } join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b 9) { }
#endif
join_node(const join_node &other) : unfolded_type(other) {} join_node(const join_node &other) : unfolded_type(other) {}
}; };
#if TBB_PREVIEW_GRAPH_NODES #if TBB_PREVIEW_GRAPH_NODES
// or node // or node
#include "internal/_flow_graph_or_impl.h" #include "internal/_flow_graph_or_impl.h"
template<typename InputTuple> template<typename InputTuple>
class or_node : public internal::unfolded_or_node<InputTuple> { class or_node : public internal::unfolded_or_node<InputTuple> {
private: private:
 End of changes. 8 change blocks. 
2 lines changed or deleted 12 lines changed or added


 pipeline.h   pipeline.h 
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __TBB_pipeline_H #ifndef __TBB_pipeline_H
#define __TBB_pipeline_H #define __TBB_pipeline_H
#include "atomic.h" #include "atomic.h"
#include "task.h" #include "task.h"
#include "tbb_allocator.h" #include "tbb_allocator.h"
#include <cstddef> #include <cstddef>
#if !TBB_IMPLEMENT_CPP0X
#include <type_traits>
#endif
namespace tbb { namespace tbb {
class pipeline; class pipeline;
class filter; class filter;
//! @cond INTERNAL //! @cond INTERNAL
namespace internal { namespace internal {
// The argument for PIPELINE_VERSION should be an integer between 2 and 9 // The argument for PIPELINE_VERSION should be an integer between 2 and 9
#define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1 #define __TBB_PIPELINE_VERSION(x) (unsigned char)(x-2)<<1
skipping to change at line 324 skipping to change at line 328
bool is_pipeline_stopped; bool is_pipeline_stopped;
flow_control() { is_pipeline_stopped = false; } flow_control() { is_pipeline_stopped = false; }
template<typename T, typename U, typename Body> friend class internal:: concrete_filter; template<typename T, typename U, typename Body> friend class internal:: concrete_filter;
public: public:
void stop() { is_pipeline_stopped = true; } void stop() { is_pipeline_stopped = true; }
}; };
//! @cond INTERNAL //! @cond INTERNAL
namespace internal { namespace internal {
template<typename T> struct is_large_object { enum { r = sizeof(T) > sizeof template<typename T> struct tbb_large_object {enum { value = sizeof(T) > si
(void *) }; }; zeof(void *) }; };
#if TBB_IMPLEMENT_CPP0X
// cannot use SFINAE in current compilers. Explicitly list the types we wi
sh to be
// placed as-is in the pipeline input_buffers.
template<typename T> struct tbb_trivially_copyable { enum { value = false }
; };
template<typename T> struct tbb_trivially_copyable <T*> { enum { value = tr
ue }; };
template<> struct tbb_trivially_copyable <short> { enum { value = true }; }
;
template<> struct tbb_trivially_copyable <unsigned short> { enum { value =
true }; };
template<> struct tbb_trivially_copyable <int> { enum { value = !tbb_large_
object<int>::value }; };
template<> struct tbb_trivially_copyable <unsigned int> { enum { value = !t
bb_large_object<int>::value }; };
template<> struct tbb_trivially_copyable <long> { enum { value = !tbb_large
_object<long>::value }; };
template<> struct tbb_trivially_copyable <unsigned long> { enum { value = !
tbb_large_object<long>::value }; };
template<> struct tbb_trivially_copyable <float> { enum { value = !tbb_larg
e_object<float>::value }; };
template<> struct tbb_trivially_copyable <double> { enum { value = !tbb_lar
ge_object<double>::value }; };
#else
#if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
template<typename T> struct tbb_trivially_copyable { enum { value = std::ha
s_trivial_copy_constructor<T>::value }; };
#else
template<typename T> struct tbb_trivially_copyable { enum { value = std::is
_trivially_copyable<T>::value }; };
#endif //
#endif // __TBB_USE_CPP0X
template<typename T> struct is_large_object {enum { value = tbb_large_objec
t<T>::value || !tbb_trivially_copyable<T>::value }; };
template<typename T, bool> class token_helper; template<typename T, bool> class token_helper;
// large object helper (uses tbb_allocator) // large object helper (uses tbb_allocator)
template<typename T> template<typename T>
class token_helper<T, true> { class token_helper<T, true> {
public: public:
typedef typename tbb::tbb_allocator<T> allocator; typedef typename tbb::tbb_allocator<T> allocator;
typedef T* pointer; typedef T* pointer;
typedef T value_type; typedef T value_type;
skipping to change at line 391 skipping to change at line 418
type_to_void_ptr_map mymap; type_to_void_ptr_map mymap;
mymap.void_overlay = ref; mymap.void_overlay = ref;
return mymap.actual_value; return mymap.actual_value;
} }
static void destroy_token( pointer /*token*/) {} static void destroy_token( pointer /*token*/) {}
}; };
template<typename T, typename U, typename Body> template<typename T, typename U, typename Body>
class concrete_filter: public tbb::filter { class concrete_filter: public tbb::filter {
const Body& my_body; const Body& my_body;
typedef token_helper<T,is_large_object<T>::r > t_helper; typedef token_helper<T,is_large_object<T>::value > t_helper;
typedef typename t_helper::pointer t_pointer; typedef typename t_helper::pointer t_pointer;
typedef token_helper<U,is_large_object<U>::r > u_helper; typedef token_helper<U,is_large_object<U>::value > u_helper;
typedef typename u_helper::pointer u_pointer; typedef typename u_helper::pointer u_pointer;
/*override*/ void* operator()(void* input) { /*override*/ void* operator()(void* input) {
t_pointer temp_input = t_helper::cast_from_void_ptr(input); t_pointer temp_input = t_helper::cast_from_void_ptr(input);
u_pointer output_u = u_helper::create_token(my_body(t_helper::token (temp_input))); u_pointer output_u = u_helper::create_token(my_body(t_helper::token (temp_input)));
t_helper::destroy_token(temp_input); t_helper::destroy_token(temp_input);
return u_helper::cast_to_void_ptr(output_u); return u_helper::cast_to_void_ptr(output_u);
} }
public: public:
concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filt er(filter_mode), my_body(body) {} concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filt er(filter_mode), my_body(body) {}
}; };
// input // input
template<typename U, typename Body> template<typename U, typename Body>
class concrete_filter<void,U,Body>: public filter { class concrete_filter<void,U,Body>: public filter {
const Body& my_body; const Body& my_body;
typedef token_helper<U, is_large_object<U>::r > u_helper; typedef token_helper<U, is_large_object<U>::value > u_helper;
typedef typename u_helper::pointer u_pointer; typedef typename u_helper::pointer u_pointer;
/*override*/void* operator()(void*) { /*override*/void* operator()(void*) {
flow_control control; flow_control control;
u_pointer output_u = u_helper::create_token(my_body(control)); u_pointer output_u = u_helper::create_token(my_body(control));
if(control.is_pipeline_stopped) { if(control.is_pipeline_stopped) {
u_helper::destroy_token(output_u); u_helper::destroy_token(output_u);
set_end_of_input(); set_end_of_input();
return NULL; return NULL;
} }
skipping to change at line 435 skipping to change at line 462
public: public:
concrete_filter(tbb::filter::mode filter_mode, const Body& body) : concrete_filter(tbb::filter::mode filter_mode, const Body& body) :
filter(static_cast<tbb::filter::mode>(filter_mode | filter_may_emit _null)), filter(static_cast<tbb::filter::mode>(filter_mode | filter_may_emit _null)),
my_body(body) my_body(body)
{} {}
}; };
template<typename T, typename Body> template<typename T, typename Body>
class concrete_filter<T,void,Body>: public filter { class concrete_filter<T,void,Body>: public filter {
const Body& my_body; const Body& my_body;
typedef token_helper<T, is_large_object<T>::r > t_helper; typedef token_helper<T, is_large_object<T>::value > t_helper;
typedef typename t_helper::pointer t_pointer; typedef typename t_helper::pointer t_pointer;
/*override*/ void* operator()(void* input) { /*override*/ void* operator()(void* input) {
t_pointer temp_input = t_helper::cast_from_void_ptr(input); t_pointer temp_input = t_helper::cast_from_void_ptr(input);
my_body(t_helper::token(temp_input)); my_body(t_helper::token(temp_input));
t_helper::destroy_token(temp_input); t_helper::destroy_token(temp_input);
return NULL; return NULL;
} }
public: public:
concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filt er(filter_mode), my_body(body) {} concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filt er(filter_mode), my_body(body) {}
 End of changes. 6 change blocks. 
6 lines changed or deleted 47 lines changed or added


 scalable_allocator.h   scalable_allocator.h 
skipping to change at line 260 skipping to change at line 260
template<typename T, typename U> template<typename T, typename U>
inline bool operator==( const scalable_allocator<T>&, const scalable_alloca tor<U>& ) {return true;} inline bool operator==( const scalable_allocator<T>&, const scalable_alloca tor<U>& ) {return true;}
template<typename T, typename U> template<typename T, typename U>
inline bool operator!=( const scalable_allocator<T>&, const scalable_alloca tor<U>& ) {return false;} inline bool operator!=( const scalable_allocator<T>&, const scalable_alloca tor<U>& ) {return false;}
} // namespace tbb } // namespace tbb
#if _MSC_VER #if _MSC_VER
#if __TBB_BUILD && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE) #if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBBMALLOC_NO_IMPLI CIT_LINKAGE)
#define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
#endif #endif
#if !__TBBMALLOC_NO_IMPLICIT_LINKAGE #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE
#ifdef _DEBUG #ifdef _DEBUG
#pragma comment(lib, "tbbmalloc_debug.lib") #pragma comment(lib, "tbbmalloc_debug.lib")
#else #else
#pragma comment(lib, "tbbmalloc.lib") #pragma comment(lib, "tbbmalloc.lib")
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 task.h   task.h 
skipping to change at line 247 skipping to change at line 247
Not used by TBB anymore. **/ Not used by TBB anymore. **/
int depth; int depth;
//! A task::state_type, stored as a byte for compactness. //! A task::state_type, stored as a byte for compactness.
/** This state is exposed to users via method task::state(). */ /** This state is exposed to users via method task::state(). */
unsigned char state; unsigned char state;
//! Miscellaneous state that is not directly visible to users, stor ed as a byte for compactness. //! Miscellaneous state that is not directly visible to users, stor ed as a byte for compactness.
/** 0x0 -> version 1.0 task /** 0x0 -> version 1.0 task
0x1 -> version >=2.1 task 0x1 -> version >=2.1 task
0x10 -> task was enqueued
0x20 -> task_proxy 0x20 -> task_proxy
0x40 -> task has live ref_count 0x40 -> task has live ref_count
0x80 -> a stolen task */ 0x80 -> a stolen task */
unsigned char extra_state; unsigned char extra_state;
affinity_id affinity; affinity_id affinity;
//! "next" field for list of task //! "next" field for list of task
tbb::task* next; tbb::task* next;
skipping to change at line 303 skipping to change at line 304
in generating internal cancellation requests (which is processed in exa ctly the in generating internal cancellation requests (which is processed in exa ctly the
same way as external ones). same way as external ones).
The context is associated with one or more root tasks and defines the c ancellation The context is associated with one or more root tasks and defines the c ancellation
group that includes all the descendants of the corresponding root task( s). Association group that includes all the descendants of the corresponding root task( s). Association
is established when a context object is passed as an argument to the ta sk::allocate_root() is established when a context object is passed as an argument to the ta sk::allocate_root()
method. See task_group_context::task_group_context for more details. method. See task_group_context::task_group_context for more details.
The context can be bound to another one, and other contexts can be boun d to it, The context can be bound to another one, and other contexts can be boun d to it,
forming a tree-like structure: parent -> this -> children. Arrows here designate forming a tree-like structure: parent -> this -> children. Arrows here designate
cancellation propagation direction. If a task in a cancellation group i cancellation propagation direction. If a task in a cancellation group i
s canceled s cancelled
all the other tasks in this group and groups bound to it (as children) all the other tasks in this group and groups bound to it (as children)
get canceled too. get cancelled too.
IMPLEMENTATION NOTE: IMPLEMENTATION NOTE:
When adding new members to task_group_context or changing types of exis ting ones, When adding new members to task_group_context or changing types of exis ting ones,
update the size of both padding buffers (_leading_padding and _trailing _padding) update the size of both padding buffers (_leading_padding and _trailing _padding)
appropriately. See also VERSIONING NOTE at the constructor definition b elow. **/ appropriately. See also VERSIONING NOTE at the constructor definition b elow. **/
class task_group_context : internal::no_copy { class task_group_context : internal::no_copy {
private: private:
friend class internal::generic_scheduler; friend class internal::generic_scheduler;
friend class task_scheduler_init; friend class task_scheduler_init;
skipping to change at line 417 skipping to change at line 418
(as child) to the context of the task calling task::allocate_root(t his_context) (as child) to the context of the task calling task::allocate_root(t his_context)
method. Cancellation requests passed to the parent context are prop agated method. Cancellation requests passed to the parent context are prop agated
to all the contexts bound to it. Similarly priority change is propa gated to all the contexts bound to it. Similarly priority change is propa gated
from the parent context to its children. from the parent context to its children.
If task_group_context::isolated is used as the argument, then the t asks associated If task_group_context::isolated is used as the argument, then the t asks associated
with this context will never be affected by events in any other con text. with this context will never be affected by events in any other con text.
Creating isolated contexts involve much less overhead, but they hav e limited Creating isolated contexts involve much less overhead, but they hav e limited
utility. Normally when an exception occurs in an algorithm that has nested utility. Normally when an exception occurs in an algorithm that has nested
ones running, it is desirably to have all the nested algorithms can celed ones running, it is desirably to have all the nested algorithms can celled
as well. Such a behavior requires nested algorithms to use bound co ntexts. as well. Such a behavior requires nested algorithms to use bound co ntexts.
There is one good place where using isolated algorithms is benefici al. It is There is one good place where using isolated algorithms is benefici al. It is
a master thread. That is if a particular algorithm is invoked direc tly from a master thread. That is if a particular algorithm is invoked direc tly from
the master thread (not from a TBB task), supplying it with explicit ly the master thread (not from a TBB task), supplying it with explicit ly
created isolated context will result in a faster algorithm startup. created isolated context will result in a faster algorithm startup.
VERSIONING NOTE: VERSIONING NOTE:
Implementation(s) of task_group_context constructor(s) cannot be ma de Implementation(s) of task_group_context constructor(s) cannot be ma de
entirely out-of-line because the run-time version must be set by th e user entirely out-of-line because the run-time version must be set by th e user
skipping to change at line 469 skipping to change at line 470
context or to one of its ancestors (if this context is bound). It i s guaranteed context or to one of its ancestors (if this context is bound). It i s guaranteed
that when this method is concurrently called on the same not yet ca ncelled that when this method is concurrently called on the same not yet ca ncelled
context, true will be returned by one and only one invocation. **/ context, true will be returned by one and only one invocation. **/
bool __TBB_EXPORTED_METHOD cancel_group_execution (); bool __TBB_EXPORTED_METHOD cancel_group_execution ();
//! Returns true if the context received cancellation request. //! Returns true if the context received cancellation request.
bool __TBB_EXPORTED_METHOD is_group_execution_cancelled () const; bool __TBB_EXPORTED_METHOD is_group_execution_cancelled () const;
//! Records the pending exception, and cancels the task group. //! Records the pending exception, and cancels the task group.
/** May be called only from inside a catch-block. If the context is alr eady /** May be called only from inside a catch-block. If the context is alr eady
canceled, does nothing. cancelled, does nothing.
The method brings the task group associated with this context exact ly into The method brings the task group associated with this context exact ly into
the state it would be in, if one of its tasks threw the currently p ending the state it would be in, if one of its tasks threw the currently p ending
exception during its execution. In other words, it emulates the act ions exception during its execution. In other words, it emulates the act ions
of the scheduler's dispatch loop exception handler. **/ of the scheduler's dispatch loop exception handler. **/
void __TBB_EXPORTED_METHOD register_pending_exception (); void __TBB_EXPORTED_METHOD register_pending_exception ();
#if __TBB_TASK_PRIORITY #if __TBB_TASK_PRIORITY
//! Changes priority of the task grop //! Changes priority of the task group
void set_priority ( priority_t ); void set_priority ( priority_t );
//! Retrieves current priority of the current task group //! Retrieves current priority of the current task group
priority_t priority () const; priority_t priority () const;
#endif /* __TBB_TASK_PRIORITY */ #endif /* __TBB_TASK_PRIORITY */
protected: protected:
//! Out-of-line part of the constructor. //! Out-of-line part of the constructor.
/** Singled out to ensure backward binary compatibility of the future v ersions. **/ /** Singled out to ensure backward binary compatibility of the future v ersions. **/
void __TBB_EXPORTED_METHOD init (); void __TBB_EXPORTED_METHOD init ();
 End of changes. 5 change blocks. 
7 lines changed or deleted 8 lines changed or added


 tbb_config.h   tbb_config.h 
skipping to change at line 141 skipping to change at line 141
#endif /* TBB_USE_THREADING_TOOLS */ #endif /* TBB_USE_THREADING_TOOLS */
#ifndef TBB_USE_PERFORMANCE_WARNINGS #ifndef TBB_USE_PERFORMANCE_WARNINGS
#ifdef TBB_PERFORMANCE_WARNINGS #ifdef TBB_PERFORMANCE_WARNINGS
#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
#else #else
#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
#endif /* TBB_PEFORMANCE_WARNINGS */ #endif /* TBB_PEFORMANCE_WARNINGS */
#endif /* TBB_USE_PERFORMANCE_WARNINGS */ #endif /* TBB_USE_PERFORMANCE_WARNINGS */
#if __MIC__ || __MIC2__
#define __TBB_DEFINE_MIC 1
#endif
#if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX) #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX)
#if TBB_USE_EXCEPTIONS #if TBB_USE_EXCEPTIONS
#error Compilation settings do not support exception handling. Plea se do not set TBB_USE_EXCEPTIONS macro or set it to 0. #error Compilation settings do not support exception handling. Plea se do not set TBB_USE_EXCEPTIONS macro or set it to 0.
#elif !defined(TBB_USE_EXCEPTIONS) #elif !defined(TBB_USE_EXCEPTIONS)
#define TBB_USE_EXCEPTIONS 0 #define TBB_USE_EXCEPTIONS 0
#endif #endif
#elif !defined(TBB_USE_EXCEPTIONS) #elif !defined(TBB_USE_EXCEPTIONS)
#if __TBB_DEFINE_MIC
#define TBB_USE_EXCEPTIONS 0
#else
#define TBB_USE_EXCEPTIONS 1 #define TBB_USE_EXCEPTIONS 1
#endif
#elif TBB_USE_EXCEPTIONS && __TBB_DEFINE_MIC
#error Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
#endif #endif
#ifndef TBB_IMPLEMENT_CPP0X #ifndef TBB_IMPLEMENT_CPP0X
/** By default, use C++0x classes if available **/ /** By default, use C++0x classes if available **/
#if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__ #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
#define TBB_IMPLEMENT_CPP0X 0 #define TBB_IMPLEMENT_CPP0X 0
#else #else
#define TBB_IMPLEMENT_CPP0X 1 #define TBB_IMPLEMENT_CPP0X 1
#endif #endif
#endif /* TBB_IMPLEMENT_CPP0X */ #endif /* TBB_IMPLEMENT_CPP0X */
skipping to change at line 233 skipping to change at line 243
#ifndef __TBB_DEFAULT_PARTITIONER #ifndef __TBB_DEFAULT_PARTITIONER
#if TBB_DEPRECATED #if TBB_DEPRECATED
/** Default partitioner for parallel loop templates in TBB 1.0-2.1 */ /** Default partitioner for parallel loop templates in TBB 1.0-2.1 */
#define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
#else #else
/** Default partitioner for parallel loop templates since TBB 2.2 */ /** Default partitioner for parallel loop templates since TBB 2.2 */
#define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
#endif /* TBB_DEPRECATED */ #endif /* TBB_DEPRECATED */
#endif /* !defined(__TBB_DEFAULT_PARTITIONER */ #endif /* !defined(__TBB_DEFAULT_PARTITIONER */
#ifdef _VARIADIC_MAX
#define __TBB_VARIADIC_MAX _VARIADIC_MAX
#else
#if _MSC_VER >= 1700
#define __TBB_VARIADIC_MAX 5 // current VS11 setting, may change.
#else
#define __TBB_VARIADIC_MAX 10
#endif
#endif
/** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by /** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by
the bugs in compilers, standard or OS specific libraries. They should b e the bugs in compilers, standard or OS specific libraries. They should b e
removed as soon as the corresponding bugs are fixed or the buggy OS/com piler removed as soon as the corresponding bugs are fixed or the buggy OS/com piler
versions go out of the support list. versions go out of the support list.
**/ **/
#if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
#define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
#endif #endif
skipping to change at line 311 skipping to change at line 331
when T has not yet been instantiated. **/ when T has not yet been instantiated. **/
#define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1 #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1
#endif #endif
#if __INTEL_COMPILER #if __INTEL_COMPILER
#define __TBB_CPP11_STD_FORWARD_BROKEN 1 #define __TBB_CPP11_STD_FORWARD_BROKEN 1
#else #else
#define __TBB_CPP11_STD_FORWARD_BROKEN 0 #define __TBB_CPP11_STD_FORWARD_BROKEN 0
#endif #endif
#if __TBB_DEFINE_MIC
/** Main thread and user's thread have different default thread affinit
y masks. **/
#define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1
#endif
#endif /* __TBB_tbb_config_H */ #endif /* __TBB_tbb_config_H */
 End of changes. 5 change blocks. 
0 lines changed or deleted 26 lines changed or added


 tbb_machine.h   tbb_machine.h 
skipping to change at line 204 skipping to change at line 204
#elif defined(_M_X64) #elif defined(_M_X64)
#include "machine/windows_intel64.h" #include "machine/windows_intel64.h"
#elif _XBOX #elif _XBOX
#include "machine/xbox360_ppc.h" #include "machine/xbox360_ppc.h"
#endif #endif
#ifdef _MANAGED #ifdef _MANAGED
#pragma managed(pop) #pragma managed(pop)
#endif #endif
#elif __TBB_DEFINE_MIC
#include "machine/mic_common.h"
#include "machine/linux_intel64.h"
#elif __linux__ || __FreeBSD__ || __NetBSD__ #elif __linux__ || __FreeBSD__ || __NetBSD__
#if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT)
#include "machine/gcc_generic.h" #include "machine/gcc_generic.h"
#elif __i386__ #elif __i386__
#include "machine/linux_ia32.h" #include "machine/linux_ia32.h"
#elif __x86_64__ #elif __x86_64__
#include "machine/linux_intel64.h" #include "machine/linux_intel64.h"
#elif __ia64__ #elif __ia64__
#include "machine/linux_ia64.h" #include "machine/linux_ia64.h"
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 tbb_stddef.h   tbb_stddef.h 
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __TBB_tbb_stddef_H #ifndef __TBB_tbb_stddef_H
#define __TBB_tbb_stddef_H #define __TBB_tbb_stddef_H
// Marketing-driven product version // Marketing-driven product version
#define TBB_VERSION_MAJOR 4 #define TBB_VERSION_MAJOR 4
#define TBB_VERSION_MINOR 0 #define TBB_VERSION_MINOR 0
// Engineering-focused interface version // Engineering-focused interface version
#define TBB_INTERFACE_VERSION 6004 #define TBB_INTERFACE_VERSION 6005
#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
// The oldest major interface version still supported // The oldest major interface version still supported
// To be used in SONAME, manifests, etc. // To be used in SONAME, manifests, etc.
#define TBB_COMPATIBLE_INTERFACE_VERSION 2 #define TBB_COMPATIBLE_INTERFACE_VERSION 2
#define __TBB_STRING_AUX(x) #x #define __TBB_STRING_AUX(x) #x
#define __TBB_STRING(x) __TBB_STRING_AUX(x) #define __TBB_STRING(x) __TBB_STRING_AUX(x)
// We do not need defines below for resource processing on windows // We do not need defines below for resource processing on windows
skipping to change at line 156 skipping to change at line 156
#if _MSC_VER #if _MSC_VER
#define __TBB_tbb_windef_H #define __TBB_tbb_windef_H
#include "internal/_tbb_windef.h" #include "internal/_tbb_windef.h"
#undef __TBB_tbb_windef_H #undef __TBB_tbb_windef_H
#endif #endif
#if !defined(_MSC_VER) || _MSC_VER>=1600 #if !defined(_MSC_VER) || _MSC_VER>=1600
#include <stdint.h> #include <stdint.h>
#endif #endif
//! Type for an assertion handler
typedef void(*assertion_handler_type)( const char* filename, int line, cons
t char* expression, const char * comment );
#if TBB_USE_ASSERT
#define __TBB_ASSERT_NS(predicate,message,ns) ((predicate)?((void)0) :
ns::assertion_failure(__FILE__,__LINE__,#predicate,message))
//! Assert that x is true.
/** If x is false, print assertion failure message.
If the comment argument is not NULL, it is printed as part of the f
ailure message.
The comment argument has no other effect. */
#if __TBBMALLOC_BUILD
namespace rml { namespace internal {
#define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,messa
ge,rml::internal)
#else
namespace tbb {
#define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,messa
ge,tbb)
#endif
#define __TBB_ASSERT_EX __TBB_ASSERT
//! Set assertion handler and return previous value of it.
assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( asser
tion_handler_type new_handler );
//! Process an assertion failure.
/** Normally called from __TBB_ASSERT macro.
If assertion handler is null, print message for assertion failure a
nd abort.
Otherwise call the assertion handler. */
void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int l
ine, const char* expression, const char* comment );
#if __TBBMALLOC_BUILD
}} // namespace rml::internal
#else
} // namespace tbb
#endif
#else /* !TBB_USE_ASSERT */
//! No-op version of __TBB_ASSERT.
#define __TBB_ASSERT(predicate,comment) ((void)0)
//! "Extended" version is useful to suppress warnings if a variable is
only used with an assert
#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))
#endif /* !TBB_USE_ASSERT */
//! The namespace tbb contains all components of the library. //! The namespace tbb contains all components of the library.
namespace tbb { namespace tbb {
#if _MSC_VER && _MSC_VER<1600 #if _MSC_VER && _MSC_VER<1600
namespace internal { namespace internal {
typedef __int8 int8_t; typedef __int8 int8_t;
typedef __int16 int16_t; typedef __int16 int16_t;
typedef __int32 int32_t; typedef __int32 int32_t;
typedef __int64 int64_t; typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; typedef unsigned __int8 uint8_t;
skipping to change at line 186 skipping to change at line 229
using ::uint8_t; using ::uint8_t;
using ::uint16_t; using ::uint16_t;
using ::uint32_t; using ::uint32_t;
using ::uint64_t; using ::uint64_t;
} // namespace internal } // namespace internal
#endif /* Posix */ #endif /* Posix */
using std::size_t; using std::size_t;
using std::ptrdiff_t; using std::ptrdiff_t;
//! Type for an assertion handler
typedef void(*assertion_handler_type)( const char* filename, int line,
const char* expression, const char * comment );
#if TBB_USE_ASSERT
//! Assert that x is true.
/** If x is false, print assertion failure message.
If the comment argument is not NULL, it is printed as part of the f
ailure message.
The comment argument has no other effect. */
#define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::ass
ertion_failure(__FILE__,__LINE__,#predicate,message))
#define __TBB_ASSERT_EX __TBB_ASSERT
//! Set assertion handler and return previous value of it.
assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( asser
tion_handler_type new_handler );
//! Process an assertion failure.
/** Normally called from __TBB_ASSERT macro.
If assertion handler is null, print message for assertion failure a
nd abort.
Otherwise call the assertion handler. */
void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int l
ine, const char* expression, const char* comment );
#else /* !TBB_USE_ASSERT */
//! No-op version of __TBB_ASSERT.
#define __TBB_ASSERT(predicate,comment) ((void)0)
//! "Extended" version is useful to suppress warnings if a variable is
only used with an assert
#define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))
#endif /* !TBB_USE_ASSERT */
//! The function returns the interface version of the TBB shared library be ing used. //! The function returns the interface version of the TBB shared library be ing used.
/** /**
* The version it returns is determined at runtime, not at compile/link tim e. * The version it returns is determined at runtime, not at compile/link tim e.
* So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. * So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time.
*/ */
extern "C" int __TBB_EXPORTED_FUNC TBB_runtime_interface_version(); extern "C" int __TBB_EXPORTED_FUNC TBB_runtime_interface_version();
//! Dummy type that distinguishes splitting constructor from copy construct or. //! Dummy type that distinguishes splitting constructor from copy construct or.
/** /**
* See description of parallel_for and parallel_reduce for example usages. * See description of parallel_for and parallel_reduce for example usages.
 End of changes. 3 change blocks. 
38 lines changed or deleted 53 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

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/