PAPI_accum(3)
πΈ NAME πΈ
PAPI_accum β Accumulate and reset counters in an EventSet. π This is the PAPI manual's PAPI_accum(3) page, and honestly it's giving useful-and-cute.
β¨ SYNOPSIS β¨
okay so this page immediately goes into the Detailed Description vibe, and the C interface is the main character. π
π Detailed Description π
π C Interface π
#include <papi.h>
int PAPI_accum( int EventSet, long_long * values );
These calls assume an initialized PAPI library and a properly added event set. PAPI_accum adds the counters of the indicated event set into the array values. The counters are zeroed and continue counting after the operation. π«Ά Note the differences between PAPI_read and PAPI_accum, specifically that PAPI_accum resets the values array to zero. No cap.
π Parameters π
EventSetβ an integer handle for a PAPI Event Set as created byPAPI_create_eventset. π*valuesβ an array to hold the counter values of the counting events. π
π Return values π
PAPI_EINVALβ One or more of the arguments is invalid. πPAPI_ESYSβ A system or C library call failed inside PAPI, see theerrnovariable. πPAPI_ENOEVSTβ The event set specified does not exist. π
π Examples π
do_100events( );
if ( PAPI_read( EventSet, values) != PAPI_OK )
handle_error( 1 );
// values[0] now equals 100
do_100events( );
if (PAPI_accum( EventSet, values ) != PAPI_OK )
handle_error( 1 );
// values[0] now equals 200
values[0] = -100;
do_100events( );
if (PAPI_accum( EventSet, values ) != PAPI_OK )
handle_error( 1 );
// values[0] now equals 0
π See also π
PAPIF_accumPAPI_startPAPI_set_optPAPI_reset
π Author π
Generated automatically by Doxygen for PAPI from the source code. π
Source/version sign-off, bestie: this PAPI_accum(3) page is from the Doxygen-generated docs for PAPI, version 7.2.0.0, dated Wed Jun 25 2025 19:30:48. Byeee! ππ¦β¨
π¦ 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