PAPI  5.7.0.0
papi_clockres.c
Go to the documentation of this file.
1 
23 #include <stdio.h>
24 #include <stdlib.h>
25 
26 #include "papi.h"
27 
28 #include "../testlib/clockcore.h"
29 
30 int
31 main( int argc, char **argv )
32 {
33  (void) argc;
34  (void) argv;
35 
36  int retval;
37 
39  if (retval != PAPI_VER_CURRENT ) {
40  fprintf(stderr,"Error with PAPI init!\n");
41  return 1;
42  }
43 
45  if (retval != PAPI_OK ) {
46  fprintf(stderr,"Error with PAPI_set_debug!\n");
47  return 1;
48  }
49 
50  printf( "Printing Clock latency and resolution.\n" );
51  printf( "-----------------------------------------------\n" );
52 
53  retval=clockcore( 0 );
54  if (retval<0) {
55  fprintf(stderr,"Error reading clock!\n");
56  return retval;
57  }
58 
59  return 0;
60 }
#define PAPI_OK
Definition: fpapi.h:105
#define PAPI_VER_CURRENT
Definition: fpapi.h:14
int main(int argc, char **argv)
Definition: papi_clockres.c:31
int retval
Definition: zero_fork.c:53
Return codes and api definitions.
int PAPI_library_init(int version)
Definition: papi.c:500
#define PAPI_VERB_ECONT
Definition: fpapi.h:39
int clockcore(int quiet)
Definition: clockcore.c:110
int PAPI_set_debug(int level)
Definition: papi.c:3126