PAPI_get_multiplex(3)
PAPI_get_multiplex(3) π
okay so bestie, welcome to the PAPI manual β this page is PAPI_get_multiplex(3), and it's giving βhow do I check if my event set is multiplexing?β energy. β¨
πΈ NAME πΈ
PAPI_get_multiplex β get the multiplexing status of specified event set.
β¨ SYNOPSIS β¨
π Detailed Description π
π§ C Interface: π§
#include <papi.h>
int PAPI_get_multiplex( int EventSet );
π¦ Fortran Interface: π¦
#include fpapi.h
PAPIF_get_multiplex( C_INT EventSet, C_INT check )
π Parameters π
EventSetβ an integer handle for a PAPI event set as created byPAPI_create_eventset
π Return values π
PAPI_OKβ βPAPI_EINVALβ One or more of the arguments is invalid, or theEventSetis already multiplexed.PAPI_ENOEVSTβ TheEventSetspecified does not exist.PAPI_EISRUNβ TheEventSetis currently counting events.PAPI_ENOMEMβ Insufficient memory to complete the operation.
so the way that this works: PAPI_get_multiplex tests the state of the PAPI_MULTIPLEXING flag in the specified event set, returning TRUE if a PAPI event set is multiplexed, or FALSE if not. iykyk. π«
π Example: π
int EventSet = PAPI_NULL;
int ret;
// Create an empty EventSet
ret = PAPI_create_eventset(&EventSet);
if (ret != PAPI_OK) handle_error(ret);
// Bind it to the CPU component
ret = PAPI_assign_eventset_component(EventSet, 0);
if (ret != PAPI_OK) handle_error(ret);
// Check current multiplex status
ret = PAPI_get_multiplex(EventSet);
if (ret == TRUE) printf("This event set is ready for multiplexing\n.")
if (ret == FALSE) printf("This event set is not enabled for multiplexing\n.")
if (ret < 0) handle_error(ret);
// Turn on multiplexing
ret = PAPI_set_multiplex(EventSet);
if ((ret == PAPI_EINVAL) && (PAPI_get_multiplex(EventSet) == TRUE))
printf("This event set already has multiplexing enabled\n");
else if (ret != PAPI_OK) handle_error(ret);
π See also π
PAPI_multiplex_initPAPI_set_optPAPI_create_eventset
π Author π
Generated automatically by Doxygen for PAPI from the source code.
xoxo, this page came from the PAPI source, version 7.2.0.0, dated Wed Jun 25 2025 19:30:48 π and the footer would say PAPI_get_multiplex(3), but we're folding that vibe in at the top instead. periodt. π«Ά
π¦ 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