|
  PAPI3:PAPI stop counters.3
| |
ViewsFrom PAPIDocs
NAME
SynopsisC Interface #include <papi.h> int PAPI_stop_counters( long long * values, int array_len ); Fortran Interface #include "fpapi.h" PAPIF_stop_counters( C_LONG_LONG(*) values, C_INT array_len, C_INT check ) DescriptionThe PAPI_stop_counters() function stops the counters and copies the counts into the *values array. The counters must have been started by a previous call to PAPI_start_counters(). After this function is called, the values are reset to zero. Arguments*values -- an array where to put the counter values array_len -- the number of items in the *values array ErrorsPAPI_EINVAL One or more of the arguments is invalid. PAPI_ENOTRUN The EventSet is not started yet. PAPI_ENOEVST The EventSet has not been added yet. Examplesint Events[2] = { PAPI_TOT_CYC, PAPI_TOT_INS }; long_long values[2]; /* Start counting events */ if (PAPI_start_counters(Events, 2) != PAPI_OK) handle_error(1); your_slow_code(); /* Stop counting events */ if (PAPI_stop_counters(values, 2) != PAPI_OK) handle_error(1); BugsThis function has no known bugs. See AlsoPAPI_read_counters(3), PAPI(3), PAPIF(3), PAPI_start_counters(3), PAPI_set_opt(3) |