50 if (!
quiet) printf(
"Need at least 1 CPU\n");
51 test_skip( __FILE__, __LINE__,
"num_cpus", 0 );
71 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
retval );
80 if (!
quiet) printf(
"Can't PAPI_CPU_ATTACH: %s\n",
98 printf(
"Default granularity is: %d (%s)\n",
tmp,
105 printf(
"Eventset[0] granularity is: %d (%s)\n",
options.granularity.granularity,
128 printf (
"Event: %s: %10lld on Cpu: %d\n",
138 printf(
"Average: %10lld\n",average);
143 diff=((double)
values[
i]-(
double)average)/(
double)average;
144 if ((diff<0.01) && (diff>-0.01)) same++;
149 printf(
"Error! %d events were the same\n",same);
151 test_fail( __FILE__, __LINE__,
"Too similar", 0 );
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
char * stringify_granularity(int granularity)
A pointer to the following is passed to PAPI_set/get_opt()
int PAPI_set_opt(int option, PAPI_option_t *ptr)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_add_named_event(int EventSet, const char *EventName)
int PAPI_library_init(int version)
int PAPI_get_opt(int option, PAPI_option_t *ptr)
int PAPI_assign_eventset_component(int EventSet, int cidx)
int PAPI_create_eventset(int *EventSet)
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)
int PAPI_start(int EventSet)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static long long values[NUM_EVENTS]