14 int main(
int argc,
char** argv)
18 assert(argc < 3 &&
"Usage: ./benchmark <input_file>");
19 in_file =
"input.data";
27 assert(data !=
NULL &&
"Out of memory");
28 in_fd = open(in_file, O_RDONLY);
29 assert(in_fd > 0 &&
"Couldn't open input data file");
38 open(
"output.data", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
39 assert(out_fd > 0 &&
"Couldn't open output data file");
48 fprintf(
stderr,
"Benchmark results are incorrect\n");
int check_data(void *vdata, void *vref)
void data_to_output(int fd, void *vdata)
void input_to_data(int fd, void *vdata)
int main(int argc, char **argv)
void run_benchmark(void *vargs)