clockres.c File Reference

Include dependency graph for clockres.c:

Go to the source code of this file.

Functions

void clockcore (void)
int main (int argc, char **argv)

Variables

int TESTS_QUIET

Function Documentation

void clockcore ( void   ) 

Definition at line 99 of file clockcore.c.

00100 {
00101     /* check PAPI_get_real_cyc */
00102     clock_res_check( 0 );
00103     /* check PAPI_get_real_usec */
00104     clock_res_check( 1 );
00105 
00106     /* check PAPI_get_virt_cyc */
00107     /* Virtual */
00108     if ( PAPI_get_virt_cyc(  ) != -1 ) {
00109         clock_res_check( 2 );
00110     } else
00111         test_fail( __FILE__, __LINE__, "PAPI_get_virt_cyc", -1 );
00112 
00113     /* check PAPI_get_virt_usec */
00114     if ( PAPI_get_virt_usec(  ) != -1 ) {
00115         clock_res_check( 3 );
00116     } else
00117         test_fail( __FILE__, __LINE__, "PAPI_get_virt_usec", -1 );
00118 }

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 28 of file clockres.c.

00029 {
00030     int retval;
00031 
00032     tests_quiet( argc, argv );  /* Set TESTS_QUIET variable */
00033 
00034     if ( ( retval =
00035            PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )
00036         test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
00037 
00038     if ( ( retval = PAPI_set_debug( PAPI_VERB_ECONT ) ) != PAPI_OK )
00039         test_fail( __FILE__, __LINE__, "PAPI_set_debug", retval );
00040 
00041     if ( !TESTS_QUIET ) {
00042         printf( "Test case: Clock latency and resolution.\n" );
00043         printf( "-----------------------------------------------\n" );
00044     }
00045 
00046     clockcore(  );
00047 
00048     test_pass( __FILE__, NULL, 0 );
00049     exit( 1 );
00050 }

Here is the call graph for this function:


Variable Documentation

Definition at line 11 of file test_utils.c.


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1