20int main(
int argc,
char **argv){
22 long long counter_values[1];
31 test_fail( __FILE__, __LINE__,
"PAPI_library_init", ret );
36 test_fail( __FILE__, __LINE__,
"PAPI_create_eventset", ret );
41 test_fail( __FILE__, __LINE__,
"PAPI_add_named_event", ret );
47 test_fail( __FILE__, __LINE__,
"PAPI_start", ret );
55 test_fail( __FILE__, __LINE__,
"PAPI_stop", ret );
59 if( counter_values[0] == 7 ){
62 test_fail( __FILE__, __LINE__,
"SDE counter values are wrong!", ret );
static papi_handle_t handle
void mintest_dowork(void)
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
initialize the PAPI library.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Return codes and api definitions.
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
papi_handle_t papi_sde_init(const char *name_of_library)
int papi_sde_register_counter(papi_handle_t handle, const char *event_name, int cntr_mode, int cntr_type, void *counter)
SDE prototypes and macros.
#define PAPI_SDE_long_long