OpenMP: Get total number of running threads

后端 未结 3 598
囚心锁ツ
囚心锁ツ 2021-02-19 02:38

I need to know the total number of threads that my application has spawned via OpenMP. Unfortunately, the omp_get_num_threads() function does not w

3条回答
  •  悲哀的现实
    2021-02-19 03:12

    Having in mind you know the exact amount of threads being created, the simplest solution I come up with is keeping your own thread counter.

    Be aware I'm completely in the dark about OpenMP as I've never really used it.

提交回复
热议问题