23main(
int argc,
char **argv )
85 ( double ) (
values[0] )[0] *
86 ( double ) clockrate *(
double ) 1000000.0;
87 test_flops = test_flops / ( double ) (
values[0] )[1];
90 printf(
"Test case 9: start, stop for derived event PAPI_FLOPS.\n" );
91 printf(
"------------------------------------------------------\n" );
93 printf(
"Default domain is: %d (%s)\n",
tmp,
96 printf(
"Default granularity is: %d (%s)\n",
tmp,
98 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
100 (
"-------------------------------------------------------------------------\n" );
102 printf(
"Test type : %12s%12s\n",
"1",
"2" );
103 printf(
TAB2,
"PAPI_FP_OPS : ", (
values[0] )[0], (
long long ) 0 );
104 printf(
TAB2,
"PAPI_TOT_CYC: ", (
values[0] )[1], (
long long ) 0 );
105 printf(
TAB2,
"PAPI_FLOPS : ", (
long long ) 0, (
values[1] )[0] );
107 (
"-------------------------------------------------------------------------\n" );
109 printf(
"Verification:\n" );
110 printf(
"Last number in row 3 approximately equals %f\n", test_flops );
111 printf(
"This test is no longer valid: PAPI_FLOPS is deprecated.\n" );
Get PAPI library or event set options.
initialize the PAPI library.
Query if PAPI event exists.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
int tests_quiet(int argc, char **argv)
int add_test_events(int *number, int *mask, int allow_derived)
char * stringify_all_domains(int domains)
char * stringify_granularity(int granularity)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
long long ** allocate_test_space(int num_tests, int num_events)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
int remove_test_events(int *EventSet, int mask)