Functions | |
kmp_int32 | __kmpc_bound_num_threads (ident_t *loc) |
kmp_int32 | __kmpc_bound_thread_num (ident_t *loc) |
kmp_int32 | __kmpc_global_num_threads (ident_t *loc) |
kmp_int32 | __kmpc_global_thread_num (ident_t *loc) |
kmp_int32 | __kmpc_in_parallel (ident_t *loc) |
These functions return information about the currently executing thread.
kmp_int32 __kmpc_bound_num_threads | ( | ident_t * | loc | ) |
loc | Source location information. |
Definition at line 177 of file kmp_csupport.c.
References __kmp_entry_thread(), and KC_TRACE.
Referenced by FTN_GET_NUM_THREADS().
kmp_int32 __kmpc_bound_thread_num | ( | ident_t * | loc | ) |
loc | Source location information. |
Definition at line 165 of file kmp_csupport.c.
References __kmp_entry_gtid, __kmp_tid_from_gtid, and KC_TRACE.
kmp_int32 __kmpc_global_num_threads | ( | ident_t * | loc | ) |
loc | Source location information. |
This function can be called in any context. It returns the total number of threads under the control of the OpenMP runtime. That is not a number that can be determined by any OpenMP standard calls, since the library may be called from more than one non-OpenMP thread, and this reflects the total over all such calls. Similarly the runtime maintains underlying threads even when they are not active (since the cost of creating and destroying OS threads is high), this call counts all such threads even if they are not waiting for work.
Definition at line 151 of file kmp_csupport.c.
kmp_int32 __kmpc_global_thread_num | ( | ident_t * | loc | ) |
loc | Source location information. |
This function can be called in any context.
If the runtime has ony been entered at the outermost level from a single (necessarily non-OpenMP*) thread, then the thread number is that which would be returned by omp_get_thread_num() in the outermost active parallel construct. (Or zero if there is no active parallel construct, since the master thread is necessarily thread zero).
If multiple non-OpenMP threads all enter an OpenMP construct then this will be a unique thread identifier among all the threads created by the OpenMP runtime (but the value cannote be defined in terms of OpenMP thread ids returned by omp_get_thread_num()).
Definition at line 128 of file kmp_csupport.c.
References __kmp_entry_gtid, and KC_TRACE.
kmp_int32 __kmpc_in_parallel | ( | ident_t * | loc | ) |
loc | Source location information. |
Definition at line 255 of file kmp_csupport.c.
References __kmp_entry_thread().