int omp_get_team_size(int level);
Summary The omp_get_team_size routine returns, for a given nested level of the current thread, the size of the thread team to which the ancestor or the current thread belongs.
Binding The binding thread set for an omp_get_team_size region is the encountering thread. The binding region for an omp_get_team_size region is the innermost enclosing parallel region.
Effect The omp_get_team_size routine returns the size of the thread team to which the ancestor or the current thread belongs. If the requested nested level is outside the range of 0 and the nested level of the current thread, as returned by the omp_get_level routine, the routine returns -1. Inactive parallel regions are regarded like active parallel regions executed with one thread.
Note – When the omp_get_team_size routine is called with a value of level=0, the routine always returns 1. If level=omp_get_level(), the routine has the same effect as the omp_get_num_threads routine.