PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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.

6 {
7  int retval;
8  int preset;
9 
10  tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
11 
12  if ( ( retval =
14  test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
15 
16  retval = PAPI_event_name_to_code( "PAPI_FP_INS", &preset );
17  if ( retval != PAPI_OK )
18  test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
19  if ( preset != PAPI_FP_INS )
20  test_fail( __FILE__, __LINE__, "Wrong preset returned", retval );
21 
22  retval = PAPI_event_name_to_code( "PAPI_TOT_CYC", &preset );
23  if ( retval != PAPI_OK )
24  test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
25  if ( preset != PAPI_TOT_CYC )
26  test_fail( __FILE__, __LINE__,
27  "*preset returned did not equal PAPI_TOT_CYC", retval );
28 
29  test_pass( __FILE__, NULL, 0 );
30  exit( 1 );
31 }
return PAPI_OK
Definition: linux-nvml.c:458
tests_quiet(argc, argv)
static int preset
Definition: event_info.c:38
test_pass(__FILE__, NULL, 0)
int int argc
Definition: iozone.c:1609
char ** argv
Definition: iozone.c:1610
test_fail(__FILE__, __LINE__,"PAPI_library_init", retval)
int PAPI_library_init(int version)
Definition: papi.c:495
#define PAPI_TOT_CYC
Definition: fpapi.h:194
#define PAPI_VER_CURRENT
Definition: fpapi.h:14
#define PAPI_FP_INS
Definition: fpapi.h:187
int PAPI_event_name_to_code(char *in, int *out)
Definition: papi.c:1003
ssize_t retval
Definition: libasync.c:338
void exit()

Here is the call graph for this function:

Variable Documentation

int TESTS_QUIET

Definition at line 11 of file test_utils.c.