PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PAPI_ipc.c File Reference
Include dependency graph for PAPI_ipc.c:

Go to the source code of this file.

Functions

 main ()
 
int your_slow_code ()
 

Function Documentation

main ( )

Definition at line 20 of file PAPI_ipc.c.

21 {
22  float real_time, proc_time,ipc;
23  long long ins;
24  float real_time_i, proc_time_i, ipc_i;
25  long long ins_i;
26  int retval;
27 
28  if((retval=PAPI_ipc(&real_time_i,&proc_time_i,&ins_i,&ipc_i)) < PAPI_OK)
29  {
30  printf("Could not initialise PAPI_ipc \n");
31  printf("retval: %d\n", retval);
32  exit(1);
33  }
34 
36 
37 
38  if((retval=PAPI_ipc( &real_time, &proc_time, &ins, &ipc))<PAPI_OK)
39  {
40  printf("retval: %d\n", retval);
41  exit(1);
42  }
43 
44 
45  printf("Real_time: %f Proc_time: %f Total instructions: %lld IPC: %f\n",
46  real_time, proc_time,ins,ipc);
47 
48  /* clean up */
49  PAPI_shutdown();
50  exit(0);
51 }
int PAPI_ipc(float *rtime, float *ptime, long long *ins, float *ipc)
Definition: papi_hl.c:316
return PAPI_OK
Definition: linux-nvml.c:458
#define printf
Definition: papi_test.h:125
int your_slow_code()
Definition: PAPI_flips.c:63
void PAPI_shutdown(void)
Definition: papi.c:4400
ssize_t retval
Definition: libasync.c:338
void exit()

Here is the call graph for this function:

int your_slow_code ( )

Definition at line 53 of file PAPI_ipc.c.

54 {
55  int i;
56  double tmp=1.1;
57 
58  for(i=1; i<2000; i++)
59  {
60  tmp=(tmp+100)/i;
61  }
62  return 0;
63 }
int i
Definition: fileop.c:140
long long tmp
Definition: iozone.c:12031