omp_get_thread_num

int omp_get_thread_num(void)
This function returns the thread number, within its team, of the thread executing the function. The thread number lies between 0 and omp_get_num_threads()-1, inclusive. The master thread of the team is thread 0.


OpenMP API Index