Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 18 of file papi_br_cn.c.
21 long long high=0,low=0,average=0,
expected=1000000;
31 printf(
"\nTesting the PAPI_BR_CN event.\n");
51 printf(
"Testing a loop with %lld conditional branches (%d times):\n",
55 for(
i=0;
i<num_runs;
i++) {
64 fprintf(stderr,
"\tCode unimplemented\n");
65 test_skip( __FILE__, __LINE__,
"unimplemented", 0);
70 "reading PAPI_TOT_INS",
retval );
78 average=(
total/num_runs);
82 if ((error > 1.0) || (error<-1.0)) {
83 if (!
quiet) printf(
"Instruction count off by more than 1%%\n");
84 test_fail( __FILE__, __LINE__,
"Error too high", 1 );
87 if (!
quiet) printf(
"\n");
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
static int expected[NUM_THREADS]
int PAPI_reset(int EventSet)
double display_error(long long average, long long high, long long low, long long expected, int quiet)
#define CODE_UNIMPLEMENTED
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_create_eventset(int *EventSet)
int branches_testcode(void)
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)