14 int main(
int argc,
char **argv)
21 assert( argc<4 &&
"Usage: ./benchmark <input_file> <check_file>" );
22 in_file =
"input.data";
24 check_file =
"check.data";
37 assert( data!=
NULL &&
"Out of memory" );
38 in_fd = open( in_file, O_RDONLY );
39 assert( in_fd>0 &&
"Couldn't open input data file");
47 out_fd = open(
"output.data", O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
48 assert( out_fd>0 &&
"Couldn't open output data file" );
58 assert( ref!=
NULL &&
"Out of memory" );
59 check_fd = open( check_file, O_RDONLY );
60 assert( check_fd>0 &&
"Couldn't open check data file");
67 fprintf(
stderr,
"Benchmark results are incorrect\n");
int check_data(void *vdata, void *vref)
void data_to_output(int fd, void *vdata)
void output_to_data(int fd, void *vdata)
void input_to_data(int fd, void *vdata)
int main(int argc, char **argv)
void run_benchmark(void *vargs)