Last change
on this file since 931 was
843,
checked in by devigne, 10 years ago
|
RWT Commit : Add soft directory.
Soft directory contains scripts used to validate the RWT protocol
|
File size:
912 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | #include "Program.hpp" |
---|
4 | #include "config.h" |
---|
5 | |
---|
6 | #include <time.h> |
---|
7 | #include <stdlib.h> |
---|
8 | #include <iostream> |
---|
9 | |
---|
10 | int main(int argc, char** argv){ |
---|
11 | |
---|
12 | if (argc != 9){ |
---|
13 | printf("usage: genere_test <nb_procs> <nb_max_incr> <nb_max_trans> <nb_diff_ML> <nb_diff_CL> <line_size> <nb_cache_lines> <out_filename>\n"); |
---|
14 | exit(1); |
---|
15 | } |
---|
16 | |
---|
17 | srand(time(NULL)); |
---|
18 | |
---|
19 | FILE * outfile; |
---|
20 | |
---|
21 | const int nb_procs = atoi(argv[1]); |
---|
22 | const int nb_max_incr = atoi(argv[2]); |
---|
23 | const int nb_max_trans = atoi(argv[3]); |
---|
24 | const int nb_diff_ML = atoi(argv[4]); |
---|
25 | const int nb_diff_CL = atoi(argv[5]); |
---|
26 | const int line_size = atoi(argv[6]); |
---|
27 | const int nb_cache_lines = atoi(argv[7]); |
---|
28 | |
---|
29 | outfile = fopen(argv[8], "w"); |
---|
30 | |
---|
31 | Program prog(nb_procs, nb_diff_ML, nb_diff_CL, nb_max_trans, nb_max_incr, line_size, nb_cache_lines); |
---|
32 | |
---|
33 | string s = prog.writeOutput(); |
---|
34 | fprintf(outfile, "%s", s.c_str()); |
---|
35 | fclose(outfile); |
---|
36 | |
---|
37 | return 0; |
---|
38 | } |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.