Blame man/man3/PAPI_set_opt.3

Packit 577717
.TH "PAPI_set_opt" 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_set_opt \- 
Packit 577717
.PP
Packit 577717
Set PAPI library or event set options\&.  
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
\fBC Interface:\fP
Packit 577717
.RS 4
Packit 577717
#include <\fBpapi\&.h\fP> 
Packit 577717
.br
Packit 577717
 int \fBPAPI_set_opt(  int option, PAPI_option_t * ptr )\fP;
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBParameters:\fP
Packit 577717
.RS 4
Packit 577717
\fIoption\fP Defines the option to be set\&. Possible values are briefly described in the table below\&.
Packit 577717
.br
Packit 577717
\fIptr\fP Pointer to a structure determined by the selected option\&. See \fBPAPI_option_t\fP for a description of possible structures\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBReturn values:\fP
Packit 577717
.RS 4
Packit 577717
\fIPAPI_OK\fP 
Packit 577717
.br
Packit 577717
\fIPAPI_EINVAL\fP The specified option or parameter is invalid\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ENOEVST\fP The EventSet specified does not exist\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_EISRUN\fP The EventSet is currently counting events\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ECMP\fP The option is not implemented for the current component\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ENOINIT\fP PAPI has not been initialized\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_EINVAL_DOM\fP Invalid domain has been requested\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBPAPI_set_opt()\fP changes the options of the PAPI library or a specific EventSet created by \fBPAPI_create_eventset\fP\&. Some options may require that the EventSet be bound to a component before they can execute successfully\&. This can be done either by adding an event or by explicitly calling \fBPAPI_assign_eventset_component\fP\&.
Packit 577717
.PP
Packit 577717
Ptr is a pointer to the \fBPAPI_option_t\fP structure, which is actually a union of different structures for different options\&. Not all options require or return information in these structures\&. Each requires different values to be set\&. Some options require a component index to be provided\&. These options are handled implicitly through the option structures\&.
Packit 577717
.PP
Packit 577717
\fBNote:\fP
Packit 577717
.RS 4
Packit 577717
Some options, such as PAPI_DOMAIN and PAPI_MULTIPLEX are also available as separate entry points in both C and Fortran\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
The reader is encouraged to peruse the ctests code in the PAPI distribution for examples of usage of \fBPAPI_set_opt\fP\&.
Packit 577717
.PP
Packit 577717
\fBPossible values for the PAPI_set_opt option parameter\fP
Packit 577717
.RS 4
Packit 577717
 
Packit 577717
OPTION          DEFINITION
Packit 577717
PAPI_DEFDOM     Set default counting domain for newly created event sets. Requires a 
Packit 577717
                component index.
Packit 577717
PAPI_DEFGRN     Set default counting granularity. Requires a component index.
Packit 577717
PAPI_DEBUG      Set the PAPI debug state and the debug handler. The debug state is 
Packit 577717
                specified in ptr->debug.level. The debug handler is specified in 
Packit 577717
                ptr->debug.handler. For further information regarding debug states and
Packit 577717
                the behavior of the handler, see PAPI_set_debug.
Packit 577717
PAPI_MULTIPLEX  Enable specified EventSet for multiplexing.
Packit 577717
PAPI_DEF_ITIMER Set the type of itimer used in software multiplexing, overflowing 
Packit 577717
                and profiling.
Packit 577717
PAPI_DEF_MPX_NS Set the sampling time slice in nanoseconds for multiplexing and overflow.
Packit 577717
PAPI_DEF_ITIMER_NS See PAPI_DEF_MPX_NS.
Packit 577717
PAPI_ATTACH     Attach EventSet specified in ptr->attach.eventset to thread or process id
Packit 577717
                specified in in ptr->attach.tid.
Packit 577717
PAPI_CPU_ATTACH Attach EventSet specified in ptr->cpu.eventset to cpu specified in in
Packit 577717
                ptr->cpu.cpu_num.
Packit 577717
PAPI_DETACH     Detach EventSet specified in ptr->attach.eventset from any thread
Packit 577717
                or process id.
Packit 577717
PAPI_DOMAIN     Set domain for EventSet specified in ptr->domain.eventset. 
Packit 577717
                Will error if eventset is not bound to a component.
Packit 577717
PAPI_GRANUL     Set granularity for EventSet specified in ptr->granularity.eventset. 
Packit 577717
                Will error if eventset is not bound to a component.
Packit 577717
PAPI_INHERIT        Enable or disable inheritance for specified EventSet.
Packit 577717
PAPI_DATA_ADDRESS   Set data address range to restrict event counting for EventSet specified
Packit 577717
                in ptr->addr.eventset. Starting and ending addresses are specified in
Packit 577717
                ptr->addr.start and ptr->addr.end, respectively. If exact addresses
Packit 577717
                cannot be instantiated, offsets are returned in ptr->addr.start_off and
Packit 577717
                ptr->addr.end_off. Currently implemented on Itanium only.
Packit 577717
PAPI_INSTR_ADDRESS  Set instruction address range as described above. Itanium only.
Packit 577717
 
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBSee Also:\fP
Packit 577717
.RS 4
Packit 577717
\fBPAPI_set_debug\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_set_multiplex\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_set_domain\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_option_t\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\&.