PAPI  5.6.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)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 8 of file eventname.c.

9 {
10  int retval;
11  int preset;
12 
13  tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
14 
15  if ( ( retval =
17  test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
18 
19  retval = PAPI_event_name_to_code( "PAPI_FP_INS", &preset );
20  if ( retval != PAPI_OK )
21  test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
22  if ( preset != PAPI_FP_INS )
23  test_fail( __FILE__, __LINE__, "Wrong preset returned", retval );
24 
25  retval = PAPI_event_name_to_code( "PAPI_TOT_CYC", &preset );
26  if ( retval != PAPI_OK )
27  test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code", retval );
28  if ( preset != PAPI_TOT_CYC )
29  test_fail( __FILE__, __LINE__,
30  "*preset returned did not equal PAPI_TOT_CYC", retval );
31 
32  test_pass( __FILE__ );
33 
34  return 0;
35 
36 }
void test_pass(const char *filename)
Definition: test_utils.c:432
return PAPI_OK
Definition: linux-nvml.c:497
int PAPI_event_name_to_code(const char *in, int *out)
Definition: papi.c:1004
int int argc
Definition: iozone.c:1609
char ** argv
Definition: iozone.c:1610
int PAPI_library_init(int version)
Definition: papi.c:500
#define PAPI_TOT_CYC
int tests_quiet(int argc, char **argv)
Definition: test_utils.c:376
void test_fail(const char *file, int line, const char *call, int retval)
Definition: test_utils.c:468
static int preset
ssize_t retval
Definition: libasync.c:338
#define PAPI_VER_CURRENT
Definition: papi.h:225
#define PAPI_FP_INS

Here is the call graph for this function: