Skip to content

Commit

Permalink
Revert workaround for GCC
Browse files Browse the repository at this point in the history
Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
  • Loading branch information
Serov, Vladimir committed Nov 22, 2021
1 parent ee3b7b6 commit f620936
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions test/tbb/test_limiter_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@ struct put_dec_body : utils::NoAssign {

};

template< typename Sender, typename Receiver >
void make_edge_impl(Sender& sender, Receiver& receiver){
#if __GNUC__ < 12 && !TBB_USE_DEBUG
// Seemingly, GNU compiler generates incorrect code for the call of limiter.register_successor in release (-03)
// The function pointer to make_edge workarounds the issue for unknown reason
auto make_edge_ptr = tbb::flow::make_edge<int>;
make_edge_ptr(sender, receiver);
#else
tbb::flow::make_edge(sender, receiver);
#endif
}

template< typename T >
void test_puts_with_decrements( int num_threads, tbb::flow::limiter_node< T >& lim , tbb::flow::graph& g) {
parallel_receiver<T> r(g);
Expand Down Expand Up @@ -367,7 +355,7 @@ void test_reserve_release_messages() {
broad.try_put(1); //failed message retrieved.
g.wait_for_all();

make_edge_impl(limit, output_queue); //putting the successor back
tbb::flow::make_edge(limit, output_queue); //putting the successor back

broad.try_put(1); //drop the count

Expand Down Expand Up @@ -465,7 +453,7 @@ void test_try_put_without_successors() {
}
);

make_edge_impl(ln, fn);
tbb::flow::make_edge(ln, fn);

g.wait_for_all();
CHECK((counter == i * try_put_num / 2));
Expand Down

0 comments on commit f620936

Please sign in to comment.