|
Packit |
577717 |
.TH "PAPI_set_domain" 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_domain \-
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
Set the default counting domain for new event sets bound to the cpu component\&.
|
|
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 |
@par C Prototype:
|
|
Packit |
577717 |
\#include <papi.h> @n
|
|
Packit |
577717 |
int PAPI_set_domain( int domain );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
@param domain one of the following constants as defined in the papi.h header file
|
|
Packit |
577717 |
@arg PAPI_DOM_USER User context counted
|
|
Packit |
577717 |
@arg PAPI_DOM_KERNEL Kernel/OS context counted
|
|
Packit |
577717 |
@arg PAPI_DOM_OTHER Exception/transient mode counted
|
|
Packit |
577717 |
@arg PAPI_DOM_SUPERVISOR Supervisor/hypervisor context counted
|
|
Packit |
577717 |
@arg PAPI_DOM_ALL All above contexts counted
|
|
Packit |
577717 |
@arg PAPI_DOM_MIN The smallest available context
|
|
Packit |
577717 |
@arg PAPI_DOM_MAX The largest available context
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.fi
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
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\&.
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.RE
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBPAPI_set_domain\fP sets the default counting domain for all new event sets created by \fBPAPI_create_eventset\fP in all threads\&. This call implicitly sets the domain for the cpu component (component 0) and is included to preserve backward compatibility\&.
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
\fBExample:\fP
|
|
Packit |
577717 |
.RS 4
|
|
Packit |
577717 |
|
|
Packit |
577717 |
.PP
|
|
Packit |
577717 |
.nf
|
|
Packit |
577717 |
int ret;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
// Initialize the library
|
|
Packit |
577717 |
ret = PAPI_library_init(PAPI_VER_CURRENT);
|
|
Packit |
577717 |
if (ret > 0 && ret != PAPI_VER_CURRENT) {
|
|
Packit |
577717 |
fprintf(stderr,"PAPI library version mismatch!\n");
|
|
Packit |
577717 |
exit(1);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
if (ret < 0) handle_error(ret);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
// Set the default domain for the cpu component
|
|
Packit |
577717 |
ret = PAPI_set_domain(PAPI_DOM_KERNEL);
|
|
Packit |
577717 |
if (ret != PAPI_OK) handle_error(ret);
|
|
Packit |
577717 |
ret = PAPI_create_eventset(&EventSet);
|
|
Packit |
577717 |
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_set_cmp_domain\fP \fBPAPI_set_granularity\fP \fBPAPI_set_opt\fP \fBPAPI_get_opt\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\&.
|