omp_get_thread_num

Purpose

Returns the thread number, within its team, of the thread executing the function.

Prototype

int omp_get_thread_num (void);

Return value

The thread number lies between 0 and omp_get_num_threads()-1, inclusive. The master thread of the team is thread 0.