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.

00021 { 
00022   float real_time, proc_time,ipc;
00023   long long ins;
00024   float real_time_i, proc_time_i, ipc_i;
00025   long long ins_i;
00026   int retval;
00027 
00028   if((retval=PAPI_ipc(&real_time_i,&proc_time_i,&ins_i,&ipc_i)) < PAPI_OK)
00029   { 
00030     printf("Could not initialise PAPI_ipc \n");
00031     printf("retval: %d\n", retval);
00032     exit(1);
00033   }
00034 
00035   your_slow_code();
00036 
00037   
00038   if((retval=PAPI_ipc( &real_time, &proc_time, &ins, &ipc))<PAPI_OK)
00039   {    
00040     printf("retval: %d\n", retval);
00041     exit(1);
00042   }
00043 
00044 
00045   printf("Real_time: %f Proc_time: %f Total instructions: %lld IPC: %f\n", 
00046          real_time, proc_time,ins,ipc);
00047 
00048   /* clean up */
00049   PAPI_shutdown();
00050   exit(0);
00051 }

Here is the call graph for this function:

int your_slow_code (  ) 

Definition at line 53 of file PAPI_ipc.c.

00054 {
00055   int i;
00056   double  tmp=1.1;
00057 
00058   for(i=1; i<2000; i++)
00059   { 
00060     tmp=(tmp+100)/i;
00061   }
00062   return 0;
00063 }


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1