libgomp: omp_get_thread_num
1
1 2.20 'omp_get_thread_num' - Current thread ID
1 =============================================
1
1 _Description_:
1 Returns a unique thread identification number within the current
1 team. In a sequential parts of the program, 'omp_get_thread_num'
1 always returns 0. In parallel regions the return value varies from
1 0 to 'omp_get_num_threads'-1 inclusive. The return value of the
1 master thread of a team is always 0.
1
1 _C/C++_:
1 _Prototype_: 'int omp_get_thread_num(void);'
1
1 _Fortran_:
1 _Interface_: 'integer function omp_get_thread_num()'
1
1 _See also_:
1 ⇒omp_get_num_threads, ⇒omp_get_ancestor_thread_num
1
1 _Reference_:
1 OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.4.
1