diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-12-05 15:20:27 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-12-05 15:20:27 +0100 |
| commit | 7a28ce25a69d3177879d134b87eeff5f754638b5 (patch) | |
| tree | c6e7418f2d28607a2caf73a81197470ebcc37e7d /1 | |
| parent | 4f3827b3165ec19abcd9e5a5892cf00c0db893ed (diff) | |
Remove shell overhead for benchmarking
Diffstat (limited to '1')
| -rw-r--r-- | 1/part1.c | 2 | ||||
| -rw-r--r-- | 1/part2.c | 2 | ||||
| -rw-r--r-- | 1/part2_fast.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -20,7 +20,7 @@ int repair(const int * arr) int main(int argc, char *argv[]) { - FILE *file = fopen(argv[1], "r"); + FILE *file = fopen(argv[argc - 1], "r"); if (!file) { return 1; } @@ -22,7 +22,7 @@ int repair(const int *arr) int main(int argc, char *argv[]) { - FILE *file = fopen(argv[1], "r"); + FILE *file = fopen(argv[argc - 1], "r"); if (!file) { return 1; } diff --git a/1/part2_fast.c b/1/part2_fast.c index b38894b..4523c65 100644 --- a/1/part2_fast.c +++ b/1/part2_fast.c @@ -123,7 +123,7 @@ int repair_avx(const int *arr) int main(int argc, char *argv[]) { - FILE *file = fopen(argv[1], "r"); + FILE *file = fopen(argv[argc - 1], "r"); if (!file) { return 1; } |
