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, component 0 is always the cpu component.

πŸ’₯ Return values πŸ’₯

  • 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.

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_opt
  • PAPI_create_eventset
  • PAPI_add_events
  • PAPI_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. πŸŽ€πŸ¦‹