PAPI  5.0.1.0
eventname.c File Reference
Include dependency graph for eventname.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Variables

int TESTS_QUIET

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 5 of file eventname.c.

{
    int retval;
    int preset;

    tests_quiet( argc, argv );  /* Set TESTS_QUIET variable */

    if ( ( retval =
           PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )
        test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );

    retval = PAPI_event_name_to_code( "PAPI_FP_INS", &preset );
    if ( retval != PAPI_OK )
        test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
    if ( preset != PAPI_FP_INS )
        test_fail( __FILE__, __LINE__, "Wrong preset returned", retval );

    retval = PAPI_event_name_to_code( "PAPI_TOT_CYC", &preset );
    if ( retval != PAPI_OK )
        test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
    if ( preset != PAPI_TOT_CYC )
        test_fail( __FILE__, __LINE__,
                   "*preset returned did not equal PAPI_TOT_CYC", retval );

    test_pass( __FILE__, NULL, 0 );
    exit( 1 );
}

Here is the call graph for this function:


Variable Documentation

Definition at line 11 of file test_utils.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines