Blame man/man3/PAPI_set_multiplex.3

Packit Service a1973e
.TH "PAPI_set_multiplex" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit Service a1973e
.ad l
Packit Service a1973e
.nh
Packit Service a1973e
.SH NAME
Packit Service a1973e
PAPI_set_multiplex \- 
Packit Service a1973e
.PP
Packit Service a1973e
Convert a standard event set to a multiplexed event set\&.  
Packit Service a1973e
Packit Service a1973e
.SH SYNOPSIS
Packit Service a1973e
.br
Packit Service a1973e
.PP
Packit Service a1973e
.SH "Detailed Description"
Packit Service a1973e
.PP 
Packit Service a1973e
Packit Service a1973e
.PP
Packit Service a1973e
\fBC Interface:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
#include <\fBpapi\&.h\fP> 
Packit Service a1973e
.br
Packit Service a1973e
 int \fBPAPI_set_multiplex( int  EventSet )\fP;
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBParameters:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fIEventSet\fP an integer handle for a PAPI event set as created by \fBPAPI_create_eventset\fP
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBReturn values:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fIPAPI_OK\fP 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_EINVAL\fP -- One or more of the arguments is invalid, or the EventSet is already multiplexed\&. 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_ENOCMP\fP -- The EventSet specified is not yet bound to a component\&. 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_ENOEVST\fP -- The EventSet specified does not exist\&. 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_EISRUN\fP -- The EventSet is currently counting events\&. 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_ENOMEM\fP -- Insufficient memory to complete the operation\&.
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_set_multiplex\fP converts a standard PAPI event set created by a call to \fBPAPI_create_eventset\fP into an event set capable of handling multiplexed events\&. This must be done after calling \fBPAPI_multiplex_init\fP, and either \fBPAPI_add_event\fP or \fBPAPI_assign_eventset_component\fP, but prior to calling \fBPAPI_start()\fP\&.
Packit Service a1973e
.PP
Packit Service a1973e
Events can be added to an event set either before or after converting it into a multiplexed set, but the conversion must be done prior to using it as a multiplexed set\&.
Packit Service a1973e
.PP
Packit Service a1973e
\fBNote:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
Multiplexing can't be enabled until PAPI knows which component is targeted\&. Due to the late binding nature of PAPI event sets, this only happens after adding an event to an event set or explicitly binding the component with a call to \fBPAPI_assign_eventset_component\fP\&.
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBExample:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
Packit Service a1973e
.PP
Packit Service a1973e
.nf
Packit Service a1973e
*   int EventSet = PAPI_NULL;
Packit Service a1973e
*   int ret;
Packit Service a1973e
*    
Packit Service a1973e
*   // Create an empty EventSet
Packit Service a1973e
*   ret = PAPI_create_eventset(&EventSet);
Packit Service a1973e
*   if (ret != PAPI_OK) handle_error(ret);
Packit Service a1973e
*   
Packit Service a1973e
*   // Bind it to the CPU component
Packit Service a1973e
*   ret = PAPI_assign_eventset_component(EventSet, 0);
Packit Service a1973e
*   if (ret != PAPI_OK) handle_error(ret);
Packit Service a1973e
*   
Packit Service a1973e
*   // Check  current multiplex status
Packit Service a1973e
*   ret = PAPI_get_multiplex(EventSet);
Packit Service a1973e
*   if (ret == TRUE) printf("This event set is ready for multiplexing\n\&.")
Packit Service a1973e
*   if (ret == FALSE) printf("This event set is not enabled for multiplexing\n\&.")
Packit Service a1973e
*   if (ret < 0) handle_error(ret);
Packit Service a1973e
*   
Packit Service a1973e
*   // Turn on multiplexing
Packit Service a1973e
*   ret = PAPI_set_multiplex(EventSet);
Packit Service a1973e
*   if ((ret == PAPI_EINVAL) && (PAPI_get_multiplex(EventSet) == TRUE))
Packit Service a1973e
*     printf("This event set already has multiplexing enabled\n");
Packit Service a1973e
*   else if (ret != PAPI_OK) handle_error(ret);
Packit Service a1973e
*   
Packit Service a1973e
Packit Service a1973e
.fi
Packit Service a1973e
.PP
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBSee Also:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fBPAPI_multiplex_init\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_get_multiplex\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_set_opt\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_create_eventset\fP 
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
.SH "Author"
Packit Service a1973e
.PP 
Packit Service a1973e
Generated automatically by Doxygen for PAPI from the source code\&.