92 long long (
values[3] )[2];
117 if (!
quiet) printf(
"No events found!\n");
118 test_skip( __FILE__, __LINE__,
"no PAPI_event", 0 );
161 printf(
"PAPI_get_overflow_event_index error: %s\n",
169 printf(
"PAPI_get_overflow_event_index error: %s\n",
202 printf(
"PAPI_get_overflow_event_index error: %s\n",
210 printf(
"PAPI_get_overflow_event_index error: %s\n",
230 printf(
"Test case: Overflow dispatch of both events in set with 2 events.\n" );
231 printf(
"---------------------------------------------------------------\n" );
232 printf(
"Threshold for overflow is: %d\n",
threshold );
233 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
234 printf(
"-----------------------------------------------\n" );
236 printf(
"Test type : %18s%18s%18s\n",
"1 (no overflow)",
"2 (batch)",
244 printf(
"Predicted overflows at event %-12s : %6d\n",
event_name[0],
246 printf(
"Predicted overflows at event %-12s : %6d\n",
event_name[1],
249 printf(
"\nBatch overflows (add, add, over, over):\n" );
250 for ( k = 0; k < 2; k++ ) {
257 printf(
"\nInterleaved overflows (add, over, add, over):\n" );
258 for ( k = 0; k < 2; k++ ) {
266 printf(
"\nCases 2+3 Unknown overflows: %d\n",
total_unknown );
267 printf(
"-----------------------------------------------\n" );
271 test_fail( __FILE__, __LINE__,
"a batch counter had no overflows", 1 );
275 "an interleaved counter had no overflows", 1 );
278 test_fail( __FILE__, __LINE__,
"Unknown counter had overflows", 1 );
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
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)
static void handler_batch(int EventSet, void *address, long long overflow_vector, void *context)
int PAPI_library_init(int version)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_get_overflow_event_index(int EventSet, long long overflow_vector, int *array, int *number)
char * PAPI_strerror(int errorCode)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
static void handler_interleaf(int EventSet, void *address, long long overflow_vector, void *context)
int find_nonderived_event(void)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
static ocount_t overflow_counts[2][3]