PAPI  5.0.1.0
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.

{ 
  float real_time, proc_time,ipc;
  long long ins;
  float real_time_i, proc_time_i, ipc_i;
  long long ins_i;
  int retval;

  if((retval=PAPI_ipc(&real_time_i,&proc_time_i,&ins_i,&ipc_i)) < PAPI_OK)
  { 
    printf("Could not initialise PAPI_ipc \n");
    printf("retval: %d\n", retval);
    exit(1);
  }

  your_slow_code();

  
  if((retval=PAPI_ipc( &real_time, &proc_time, &ins, &ipc))<PAPI_OK)
  {    
    printf("retval: %d\n", retval);
    exit(1);
  }


  printf("Real_time: %f Proc_time: %f Total instructions: %lld IPC: %f\n", 
         real_time, proc_time,ins,ipc);

  /* clean up */
  PAPI_shutdown();
  exit(0);
}

Here is the call graph for this function:

int your_slow_code ( )

Definition at line 53 of file PAPI_ipc.c.

{
  int i;
  double  tmp=1.1;

  for(i=1; i<2000; i++)
  { 
    tmp=(tmp+100)/i;
  }
  return 0;
}
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines