Community
cancel
Showing results for 
Search instead for 
Did you mean: 
yesilgulalp
Novice
80 Views

tbb::task_scheduler_init class (newbie)

Jump to solution

Hi,

In the past, there was a class named "task_scheduler_init" in the "tbb" library, but I think that class does not exist anymore. For example, instead of the "tbb :: task_scheduler_init :: default_num_threads ()" function, there could be an approach like this link -> https://github.com/oneapi-src/oneTBB/issues/248
My question is how can I determine how many threads to use for execution. Specifically "tbb :: task_scheduler_init init {number};" What can I use instead?

0 Kudos

Accepted Solutions
James_T_Intel
Moderator
47 Views

You will need to use task_arena and control the concurrency to achieve this effect. When you create a task_arena, you can specify the maximum concurrency, which will set how many threads are used. Please see https://software.intel.com/content/www/us/en/develop/documentation/tbb-documentation/top/intel-threa... for details.


View solution in original post

3 Replies
AbhishekD_Intel
Moderator
58 Views

Hi,

Thanks for reaching out to us.

As this issue is more related to TBB, we are moving this issue to the oneAPI TBB forum.


Warm Regards,

Abhishek


James_T_Intel
Moderator
48 Views

You will need to use task_arena and control the concurrency to achieve this effect. When you create a task_arena, you can specify the maximum concurrency, which will set how many threads are used. Please see https://software.intel.com/content/www/us/en/develop/documentation/tbb-documentation/top/intel-threa... for details.


View solution in original post

James_T_Intel
Moderator
46 Views

This issue has been resolved and we will no longer monitor this thread. If you require additional assistance from Intel, please start a new thread.Any further interaction in this thread will be considered community only.