Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TBB concurrent_vector with openmp

Tags:

c++

openmp

tbb

Can we use TBB concurrent_vector with openmp?

Will concurrent updates be allowed?

like image 290
Abhishek Avatar asked Jan 19 '23 13:01

Abhishek


1 Answers

Yes, TBB's concurrent data structures are meant to be thread-safe, which means whatever threading paradigms, such as OpenMP, TBB, Cilk, PPL, and etc, are okay to use TBB's concurrent data structures. This is because concurrent_vector is simply a data structure class rather than threading-related control code.

Furthermore, TBB's mutex can be also used within OpenMP, Cilk, and PPL.

like image 158
minjang Avatar answered Jan 29 '23 22:01

minjang