24int main(
int argc,
char** argv) {
34 fprintf(
stderr,
"PAPI_library_init version mismatch\n");
40 fprintf(
stderr,
"Error creating event set\n");
44 if (!
TESTS_QUIET) printf(
"This program will read from stdin and echo it to stdout\n");
51 fprintf(
stderr,
"Error getting code for %s\n",
names[e]);
56 fprintf(
stderr,
"Error adding %s to event set\n",
names[e]);
63 fprintf(
stderr,
"Error in PAPI_start\n");
79 while (
select(1,&readfds,NULL,NULL,NULL)) {
82 if (bytes == 0)
break;
88 fprintf(
stderr,
"Error in PAPI_stop\n");
ssize_t write(int fd, const void *buf, size_t count)
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
ssize_t read(int fd, void *buf, size_t count)
const char * names[NUM_EVENTS]
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
initialize the PAPI library.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
static long long values[NUM_EVENTS]
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_pass(const char *filename)