Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
◆ NUM_EVENTS
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 23 of file appio_test_seek.c.
25 const char*
names[
NUM_EVENTS] = {
"READ_CALLS",
"READ_BYTES",
"READ_BLOCK_SIZE",
"READ_USEC",
"SEEK_CALLS",
"SEEK_USEC",
"SEEK_ABS_STRIDE_SIZE"};
28 char *infile =
"/etc/group";
35 fprintf(stderr,
"PAPI_library_init version mismatch\n");
40 if (!
TESTS_QUIET) printf(
"This program will do a strided read %s and write it to stdout\n", infile);
46 fprintf(stderr,
"Error getting code for %s\n",
names[e]);
53 fprintf(stderr,
"Error in PAPI_start_counters\n");
57 fdin=
open(infile, O_RDONLY);
58 if (fdin < 0) perror(
"Could not open file for reading: \n");
67 while ((bytes =
read(fdin,
buf, 32)) > 0) {
69 lseek(fdin, 16, SEEK_CUR);
80 fprintf(stderr,
"Error in PAPI_stop_counters\n");
ssize_t read(int fd, void *buf, size_t count)
void test_pass(const char *filename)
static int Events[NUM_EVENTS]
off_t lseek(int fd, off_t offset, int whence)
int PAPI_event_name_to_code(const char *in, int *out)
int open(const char *pathname, int flags, mode_t mode)
int PAPI_library_init(int version)
ssize_t write(int fd, const void *buf, size_t count)
int PAPI_stop_counters(long long *values, int array_len)
int tests_quiet(int argc, char **argv)
int PAPI_start_counters(int *events, int array_len)
static long long values[NUM_EVENTS]
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
const char * names[NUM_EVENTS]