papi_assign_eventset_component(3) - Linux man page
Name
PAPI_assign_eventset_component - assign a component index to an existing but empty EventSetSynopsis
C Interface#include <papi.h>PAPI_assign_eventset_component (int EventSet",intcidx);"
Description
Arguments
EventSet -- An integer identifier for an existingEventSet
cidx -- An integer identifier for a component. By convention, component 0 is always the cpu component.
Return Values
On success, this function returnsPAPI_OK. On error, a non-zero error code is returned.
Errors
- PAPI_ENOCMP
- The argument cidx is not a valid component.
- PAPI_ENOEVST
- The EventSet doesn't exist.
- PAPI_ENOMEM
- Insufficient memory to complete the operation.
Examples
int EventSet = PAPI_NULL; if (PAPI_create_eventset(&EventSet) != PAPI_OK) handle_error(1); /* Bind our EventSet to the cpu component */ if (PAPI_assign_eventset_component(EventSet, 0) != PAPI_OK) handle_error(1); /* Convert our EventSet to multiplexing */ if (PAPI_set_multiplex(EventSet) != PAPI_OK) handle_error(1);