51 long long (
values[2] )[2];
72 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
82 if (!
quiet) printf(
"Trouble adding event!\n");
83 test_skip(__FILE__,__LINE__,
"Event add",1);
87 printf(
"Using %#x for the overflow event\n",
PAPI_event);
142 printf(
"Test case: Overflow dispatch of 2nd event in set with 2 events.\n" );
143 printf(
"---------------------------------------------------------------\n" );
144 printf(
"Threshold for overflow is: %d\n",
mythreshold );
145 printf(
"Using %d iterations of c += a*b\n", num_flops );
146 printf(
"-----------------------------------------------\n" );
148 printf(
"Test type : %16d%16d\n", 1, 2 );
151 printf(
"Overflows : %16s%16d\n",
"",
total );
152 printf(
"-----------------------------------------------\n" );
164 printf(
"Verification:\n" );
165 #if defined(linux) || defined(__ia64__) || defined(_POWER4) 169 printf(
"Row 1 approximately equals %d %d\n", num_flops,
172 printf(
"Column 1 approximately equals column 2\n" );
173 printf(
"Row 3 approximately equals %u +- %u %%\n",
191 printf(
"Overflows: total(%d) > max(%lld) || " 195 test_fail( __FILE__, __LINE__,
"Overflows", 1 );
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
int PAPI_overflow(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_library_init(int version)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
void handler(int EventSet, void *address, long long overflow_vector, void *context)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_destroy_eventset(int *EventSet)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
static long long mythreshold
int PAPI_start(int EventSet)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static long long values[NUM_EVENTS]
static const PAPI_hw_info_t * hw_info