omp_get_ancestor_thread_num

Purpose

Returns the thread number of the ancestor of the current thread at a given nested level. Returns -1 if the nested level is not within the range of 0 and the current thread's nested level as returned by omp_get_level.

Prototype

int omp_get_ancestor_thread_num(int level);

Parameter

level
Specifies a given nested level of the current thread.