1PAPI_stop_counters(3)                PAPI                PAPI_stop_counters(3)
2
3
4

NAME

6       PAPI_stop_counters - PAPI High Level: stop counting hardware events and
7       reset values to zero
8
9

SYNOPSIS

11       C Interface
12       #include <papi.h>
13       int PAPI_stop_counters(long_long *values, int array_len);
14       Fortran Interface
15       PAPIF_stop_counters(C_LONG_LONG(*) values, C_INT array_len, C_INT check)
16       #include fpapi.h
17
18

DESCRIPTION

20       PAPI_stop_counters()
21
22       This function stops the counters and copies the counts into the  values
23       array.  The  counters  must  have  been  started  by a previous call to
24       PAPI_start_counters().  After this function is called, the  values  are
25       reset to zero.
26

ARGUMENTS

28       *values -- an array where to put the counter values
29
30       array_len -- the number of items in the *values array
31

RETURN VALUES

33       On success, this function returns PAPI_OK.
34        On error, a non-zero error code is returned.
35
36

ERRORS

38       PAPI_EINVAL
39              One or more of the arguments is invalid.
40
41       PAPI_ENOTRUN
42              The eventset is not started yet.
43
44       PAPI_ENOEVST
45              The eventset has not been added yet.
46
47

EXAMPLES

49         int Events[2] = { PAPI_TOT_CYC, PAPI_TOT_INS };
50         long_long values[2];
51         /* Start counting events */
52         if (PAPI_start_counters(Events, 2) != PAPI_OK)
53           handle_error(1);
54         your_slow_code();
55         /* Stop counting events */
56         if (PAPI_stop_counters(values, 2) != PAPI_OK)
57           handle_error(1);
58
59

BUGS

61       This function has no known bugs.
62
63

SEE ALSO

65       PAPI_start_counters(3),PAPI_set_opt(3),                 PAPI_read_coun‐
66       ters(3),PAPI"(3),"PAPIF(3)
67
68
69
70PAPI Programmer's Reference     September, 2004          PAPI_stop_counters(3)
Impressum