Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

Multiple pipelines

TBB pipeline FAQ says that multiple TBB pipelines can be run concurrently if they are launched from different TBB tasks or OS threads. I would like to clarify the meaning of OS threads: do you mean logical threads, as can be created by pthreads, say?

Regards,

Priya

0 Kudos
1 Reply
Highlighted
New Contributor III
9 Views

Exactly. Threads that are explicitly created by means of APIs like pthread_create, _beginthreadex, or CreateThread are usually referred to as OS threads. Another example of OS thread is the thread implicitly created for you by OS to run your main, or WinMain, or DllMain , or whatever else entry function of your application/module.

In general it is safe (from both correctness and performance standpoint) to run TBB's parallel algorithms from wherever you are, independently on whether other TBB algorithms has already been started from other threads. It is also safe to run one algorithm inside the other (nested parallelism). TBB efficiently handles all these usage models.

0 Kudos