File: PAPI_get_multiplex.3

package info (click to toggle)
papi 5.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 27,244 kB
  • ctags: 37,740
  • sloc: ansic: 384,780; makefile: 3,319; fortran: 3,306; xml: 2,460; sh: 791; python: 515; perl: 269; asm: 24
file content (97 lines) | stat: -rw-r--r-- 2,253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.TH "PAPI_get_multiplex" 3 "Mon Jun 30 2014" "Version 5.3.2.0" "PAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
PAPI_get_multiplex \- 
.PP
Get the multiplexing status of specified event set\&.  

.SH SYNOPSIS
.br
.PP
.SH "Detailed Description"
.PP 

.PP
\fBC Interface:\fP
.RS 4
#include <\fBpapi\&.h\fP> 
.br
 int \fBPAPI_get_multiplex( int  EventSet )\fP;
.RE
.PP
\fBFortran Interface:\fP
.RS 4
#include fpapi\&.h 
.br
 \fBPAPIF_get_multiplex( C_INT  EventSet,  C_INT  check )\fP
.RE
.PP
\fBParameters:\fP
.RS 4
\fIEventSet\fP an integer handle for a PAPI event set as created by \fBPAPI_create_eventset\fP
.RE
.PP
\fBReturn values:\fP
.RS 4
\fIPAPI_OK\fP 
.br
\fIPAPI_EINVAL\fP One or more of the arguments is invalid, or the EventSet is already multiplexed\&. 
.br
\fIPAPI_ENOEVST\fP The EventSet specified does not exist\&. 
.br
\fIPAPI_EISRUN\fP The EventSet is currently counting events\&. 
.br
\fIPAPI_ENOMEM\fP Insufficient memory to complete the operation\&.
.RE
.PP
\fBPAPI_get_multiplex\fP tests the state of the PAPI_MULTIPLEXING flag in the specified event set, returning \fITRUE\fP if a PAPI event set is multiplexed, or FALSE if not\&. 
.PP
\fBExample:\fP
.RS 4

.PP
.nf
*   int EventSet = PAPI_NULL;
*   int ret;
*    
*   // Create an empty EventSet
*   ret = PAPI_create_eventset(&EventSet);
*   if (ret != PAPI_OK) handle_error(ret);
*   
*   // Bind it to the CPU component
*   ret = PAPI_assign_eventset_component(EventSet, 0);
*   if (ret != PAPI_OK) handle_error(ret);
*   
*   // Check  current multiplex status
*   ret = PAPI_get_multiplex(EventSet);
*   if (ret == TRUE) printf("This event set is ready for multiplexing\n\&.")
*   if (ret == FALSE) printf("This event set is not enabled for multiplexing\n\&.")
*   if (ret < 0) handle_error(ret);
*   
*   // Turn on multiplexing
*   ret = PAPI_set_multiplex(EventSet);
*   if ((ret == PAPI_EINVAL) && (PAPI_get_multiplex(EventSet) == TRUE))
*     printf("This event set already has multiplexing enabled\n");
*   else if (ret != PAPI_OK) handle_error(ret);
*   

.fi
.PP
 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBPAPI_multiplex_init\fP 
.PP
\fBPAPI_set_opt\fP 
.PP
\fBPAPI_create_eventset\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for PAPI from the source code\&.