Blame man/man3/PAPI_set_multiplex.3

Packit 577717
.TH "PAPI_set_multiplex" 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_multiplex \- 
Packit 577717
.PP
Packit 577717
Convert a standard event set to a multiplexed event set\&.  
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_multiplex( int  EventSet )\fP;
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBParameters:\fP
Packit 577717
.RS 4
Packit 577717
\fIEventSet\fP an integer handle for a PAPI event set as created by \fBPAPI_create_eventset\fP
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 -- One or more of the arguments is invalid, or the EventSet is already multiplexed\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ENOCMP\fP -- The EventSet specified is not yet bound to a component\&. 
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_ENOMEM\fP -- Insufficient memory to complete the operation\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\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 577717
.PP
Packit 577717
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 577717
.PP
Packit 577717
\fBNote:\fP
Packit 577717
.RS 4
Packit 577717
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 577717
.RE
Packit 577717
.PP
Packit 577717
\fBExample:\fP
Packit 577717
.RS 4
Packit 577717
Packit 577717
.PP
Packit 577717
.nf
Packit 577717
*   int EventSet = PAPI_NULL;
Packit 577717
*   int ret;
Packit 577717
*    
Packit 577717
*   // Create an empty EventSet
Packit 577717
*   ret = PAPI_create_eventset(&EventSet);
Packit 577717
*   if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*   
Packit 577717
*   // Bind it to the CPU component
Packit 577717
*   ret = PAPI_assign_eventset_component(EventSet, 0);
Packit 577717
*   if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*   
Packit 577717
*   // Check  current multiplex status
Packit 577717
*   ret = PAPI_get_multiplex(EventSet);
Packit 577717
*   if (ret == TRUE) printf("This event set is ready for multiplexing\n\&.")
Packit 577717
*   if (ret == FALSE) printf("This event set is not enabled for multiplexing\n\&.")
Packit 577717
*   if (ret < 0) handle_error(ret);
Packit 577717
*   
Packit 577717
*   // Turn on multiplexing
Packit 577717
*   ret = PAPI_set_multiplex(EventSet);
Packit 577717
*   if ((ret == PAPI_EINVAL) && (PAPI_get_multiplex(EventSet) == TRUE))
Packit 577717
*     printf("This event set already has multiplexing enabled\n");
Packit 577717
*   else if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*   
Packit 577717
Packit 577717
.fi
Packit 577717
.PP
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBSee Also:\fP
Packit 577717
.RS 4
Packit 577717
\fBPAPI_multiplex_init\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_get_multiplex\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_set_opt\fP 
Packit 577717
.PP
Packit 577717
\fBPAPI_create_eventset\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\&.