PAPI 7.1.0.0
Loading...
Searching...
No Matches
PAPI_ipc.c File Reference
Include dependency graph for PAPI_ipc.c:

Go to the source code of this file.

Functions

int your_slow_code ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 21 of file PAPI_ipc.c.

22{
23 float real_time, proc_time,ipc;
24 long long ins;
25 float real_time_i, proc_time_i, ipc_i;
26 long long ins_i;
27 int retval;
28
29 if((retval=PAPI_ipc(&real_time_i,&proc_time_i,&ins_i,&ipc_i)) < PAPI_OK)
30 {
31 printf("Could not initialise PAPI_ipc \n");
32 printf("retval: %d\n", retval);
33 exit(1);
34 }
35
37
38
39 if((retval=PAPI_ipc( &real_time, &proc_time, &ins, &ipc))<PAPI_OK)
40 {
41 printf("retval: %d\n", retval);
42 exit(1);
43 }
44
45
46 printf("Real_time: %f Proc_time: %f Instructions: %lld IPC: %f\n",
47 real_time, proc_time,ins,ipc);
48
49 /* clean up */
51 exit(0);
52}
int your_slow_code()
Definition: PAPI_ipc.c:54
Simplified call to get instructions per cycle, real and processor time.
Finish using PAPI and free all related resources.
#define PAPI_OK
Definition: f90papi.h:73
int retval
Definition: zero_fork.c:53
Here is the call graph for this function:

◆ your_slow_code()

int your_slow_code ( )

Definition at line 54 of file PAPI_ipc.c.

55{
56 int i;
57 double tmp=1.1;
58
59 for(i=1; i<2000; i++)
60 {
61 tmp=(tmp+100)/i;
62 }
63 return 0;
64}
double tmp
int i
Here is the caller graph for this function: