Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

an odd error

Liu_M_1
Beginner
402 Views

there is a project using tbb on UBUNTU with gcc4.8.x.  Some errors occoured when  that project compiled:

 

TBB/include/tbb/internal/_flow_graph_join_impl.h:1420:27: error: expected '>' before numeric constant

TBB/include/tbb/internal/_flow_graph_join_impl.h:1421:38: error: expected identifier before numeric constant

unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g,

^

TBB/include/tbb/internal/_flow_graph_join_impl.h:1421:38: error: expected ',' or '...' before numeric constant

TBB/include/tbb/internal/_flow_graph_join_impl.h:1421:38: error: expected identifier before numeric constant

unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g,

 

 

all errors just result from constructor from class unfolded_join_node .And it look like B0,B1 are unknown type.

Is there anyone has the same problem?

 

0 Kudos
5 Replies
RafSchietekat
Valued Contributor III
402 Views

Try "#ifdef B0 / #error / #endif" (3 lines of code), and searching for other uses of B0? BTW, you specify the compiler, but not the version of Ubuntu, TBB, and how it came there...

0 Kudos
Liu_M_1
Beginner
402 Views

please notify that  errors are reported by the file _flow_graph_join_impl.h from TBB.

e.g

    template<typename OutputTuple>
    class unfolded_join_node<2,tag_matching_port,OutputTuple,tag_matching> : public
            join_base<2,tag_matching_port,OutputTuple,tag_matching>::type {
        typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0;
        typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1;
    public:
        typedef typename wrap_tuple_elements<2,tag_matching_port,OutputTuple>::type input_ports_type;
        typedef OutputTuple output_type;
    private:
        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<T1, tag_value> *f1_p;
        typedef typename tbb::flow::tuple< f0_p, f1_p > func_initializer_type;
    public:
   /*****************************************************/
  //this area is the place where errors occoured 
  //this constructor  show the type B0,B1
 //
    template<typename B0, typename B1>
        unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g,
                func_initializer_type(
                    new internal::function_body_leaf<T0, tag_value, B0>(b0),
                    new internal::function_body_leaf<T1, tag_value, B1>(b1)
                    ) ) {}
  /*****************************************************/
        unfolded_join_node(const unfolded_join_node &other) : base_type(other) {}
    };

by the way the platform:

ubuntu server 14.04.1

tbb 4.3 stable release

0 Kudos
Alexey-Kukanov
Employee
402 Views

My educated guess is that your program #defines B0 as some numeric constant (maybe indirectly, e.g. in a 3rd party library header file) before #including TBB headers. The preprocessor then replaces B0 in the TBB headers with that number, making the code incorrect. Raf seemingly has the same guess, and his suggestion above would check whether this guess is correct.

0 Kudos
Liu_M_1
Beginner
402 Views

that error show that meaning.

I  actually used third party libraries. But as far I did not find that name.I will  leave a comment if I really find that

0 Kudos
jimdempseyatthecove
Honored Contributor III
402 Views
0 Kudos
Reply