Blame man/man3/PAPI_thread_init.3
|
Packit |
577717 |
.TH "PAPI_thread_init" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
|
|
Packit |
577717 |
.ad l
|
|
Packit |
577717 |
.nh
|
|
Packit |
577717 |
.SH NAME
|
|
Packit |
577717 |
PAPI_thread_init \-
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
Initialize thread support in the PAPI library\&.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.SH SYNOPSIS
|
|
Packit |
577717 |
.br
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.SH "Detailed Description"
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.nf
|
|
Packit |
577717 |
@param *id_fn
|
|
Packit |
577717 |
Pointer to a function that returns current thread ID.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
PAPI_thread_init initializes thread support in the PAPI library.
|
|
Packit |
577717 |
Applications that make no use of threads do not need to call this routine.
|
|
Packit |
577717 |
This function MUST return a UNIQUE thread ID for every new thread/LWP created.
|
|
Packit |
577717 |
The OpenMP call omp_get_thread_num() violates this rule, as the underlying
|
|
Packit |
577717 |
LWPs may have been killed off by the run-time system or by a call to omp_set_num_threads() .
|
|
Packit |
577717 |
In that case, it may still possible to use omp_get_thread_num() in
|
|
Packit |
577717 |
conjunction with PAPI_unregister_thread() when the OpenMP thread has finished.
|
|
Packit |
577717 |
However it is much better to use the underlying thread subsystem's call,
|
|
Packit |
577717 |
which is pthread_self() on Linux platforms.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.fi
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.nf
|
|
Packit |
577717 |
if ( PAPI_thread_init(pthread_self) != PAPI_OK )
|
|
Packit |
577717 |
exit(1);
|
|
Packit |
577717 |
*
|
|
Packit |
577717 |
.fi
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBSee Also:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
\fBPAPI_register_thread\fP \fBPAPI_unregister_thread\fP \fBPAPI_get_thr_specific\fP \fBPAPI_set_thr_specific\fP \fBPAPI_thread_id\fP \fBPAPI_list_threads\fP
|
|
Packit |
577717 |
.RE
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.SH "Author"
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
Generated automatically by Doxygen for PAPI from the source code\&.
|