TBB concurrent_vector with openmp [英] TBB concurrent_vector with openmp
本文介绍了TBB concurrent_vector with openmp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以使用带openmp的TBB concurrent_vector?
Can we use TBB concurrent_vector with openmp?
是否允许并发更新?
推荐答案
是的,TBB的并发数据结构意味着线程安全,这意味着任何线程范例,如OpenMP,TBB,Cilk,PPL等,都可以使用TBB的并发数据结构。这是因为 concurrent_vector
只是一个数据结构类而不是线程相关的控制代码。
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.
此外,TBB的互斥也可以在OpenMP,Cilk和PPL中使用。
Furthermore, TBB's mutex can be also used within OpenMP, Cilk, and PPL.
这篇关于TBB concurrent_vector with openmp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文