PAPI_assign_eventset_component(3)
π PAPI_assign_eventset_component(3) π
okay so weβre in the PAPI manual, bestie, and this page is all about PAPI_assign_eventset_component. Itβs giving βbind an EventSet to a component before you do component-coded things,β and honestly? iconic. β¨
πΈ NAME πΈ
PAPI_assign_eventset_component β Assign a component index to an existing but empty EventSet.
β¨ SYNOPSIS β¨
okay so the synopsis is basically βthis page has a detailed description, and the C interface is right hereβ β very demure, very mindful. π
π Detailed Description π
π C Interface: π
#include <papi.h>
PAPI_assign_eventset_component( int EventSet, int cidx );
π§Έ Parameters π§Έ
EventSetβ An integer identifier for an existing EventSet.cidxβ An integer identifier for a component. By convention, component0is always the cpu component.
π₯ Return values π₯
PAPI_ENOCMPβ The argumentcidxis not a valid component.PAPI_ENOEVSTβ The EventSet doesn't exist.PAPI_ENOMEMβ Insufficient memory to complete the operation.
okay so hereβs the tea: PAPI_assign_eventset_component assigns a specific component index, as specified by cidx, to a new EventSet identified by EventSet, as obtained from PAPI_create_eventset. EventSets are ordinarily automatically bound to components when the first event is added. This routine is useful to explicitly bind an EventSet to a component before setting component related options. π
π Examples π
like, literally:
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 );
π See also π
PAPI_set_optPAPI_create_eventsetPAPI_add_eventsPAPI_set_multiplex
π Author π
Generated automatically by Doxygen for PAPI from the source code. π€π
Thatβs the whole page, bestie β go bind that EventSet with main character energy. π This is the PAPI manual, version 7.2.0.0, dated Wed Jun 25 2025. ππ¦
π¦ where this page comes from
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- ubuntu resolute: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms