In OpenMp we have omp_get_num_threads() that return the number of the available threads on the system. Do we have any function or class property in TBB that tell us the similar number(number of available tasks or available threads)?
I know in TBB we have tasks instead of thread, but I need to find out how many tasks(threads) available for the sake of my research whenever I initialize task scheduler automatically.
By default, the scheduler uses tbb::task_scheduler_init::default_max_threads() threads. The number of tasks is unlimited.
You can easily find this information in the User Guide and the Reference Manual.