logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PAPI_assign_eventset_component - Assign a component index to an existing but empty EventSet.

Author

       Generated automatically by Doxygen for PAPI from the source code.

Version 7.1.0.0                                  Thu Dec 14 2023               PAPI_assign_eventset_component(3)

Detailed Description

CInterface:
           #include <papi.h>
           PAPI_assign_eventset_component(intEventSet,intcidx);

       ParametersEventSet An integer identifier for an existing EventSet.
           cidx An integer identifier for a component. By convention, component 0 is always the cpu component.

       ReturnvaluesPAPI_ENOCMP The argument cidx is not a valid component.
           PAPI_ENOEVST The EventSet doesn't exist.
           PAPI_ENOMEM Insufficient memory to complete the operation.

       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:

           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 );

       SeealsoPAPI_set_optPAPI_create_eventsetPAPI_add_eventsPAPI_set_multiplex

Name

       PAPI_assign_eventset_component - Assign a component index to an existing but empty EventSet.

Synopsis

See Also