@@ -103,53 +103,53 @@ let rec parseArgsRec args optionsSoFar =
103
103
parseArgsRec xss { optionsSoFar with benchmarks= optionsSoFar.benchmarks @ [ f]}
104
104
| _ ->
105
105
eprintfn " Option -b needs to be followed by a benchmark name (1, 2)."
106
- parseArgsRec xs optionsSoFar
106
+ exit 1
107
107
| ( " /m" | " -m" ) :: xs ->
108
108
match xs with
109
109
| (( " auto" | " numeric" ) as f):: xss ->
110
110
parseArgsRec xss { optionsSoFar with modes = optionsSoFar.modes @ [ f]}
111
111
| _ ->
112
112
eprintfn " Option -b needs to be followed by a mode name (auto,numeric)."
113
- parseArgsRec xs optionsSoFar
113
+ exit 1
114
114
| " /f" :: xs | " -f" :: xs ->
115
115
match xs with
116
116
| f:: xss ->
117
117
parseArgsRec xss { optionsSoFar with fileName = f; changed = true }
118
118
| _ ->
119
119
eprintfn " Option -f needs to be followed by a file name."
120
- parseArgsRec xs optionsSoFar
120
+ exit 1
121
121
| " /r" :: xs | " -r" :: xs ->
122
122
match xs with
123
123
| r:: xss ->
124
124
let couldparse , reps = System.Int32.TryParse r
125
125
if couldparse then
126
126
if reps < minRepetitions then
127
127
eprintfn " Given value for -r was too small, using the minimum: %i ." minRepetitions
128
- parseArgsRec xss { optionsSoFar with repetitions = minRepetitions ; changed = true }
128
+ exit 1
129
129
else
130
130
parseArgsRec xss { optionsSoFar with repetitions = reps; changed = true }
131
131
else
132
132
eprintfn " Option -r was followed by an invalid value."
133
- parseArgsRec xs optionsSoFar
133
+ exit 1
134
134
| _ ->
135
135
eprintfn " Option -r needs to be followed by a number."
136
- parseArgsRec xs optionsSoFar
136
+ exit 1
137
137
| " /vsize" :: xs | " -vsize" :: xs ->
138
138
match xs with
139
139
| s:: xss ->
140
140
let couldparse , size = System.Int32.TryParse s
141
141
if couldparse then
142
142
if size < minVectorSize then
143
143
eprintfn " Given value for -vsize was too small, using the minimum: %i ." minVectorSize
144
- parseArgsRec xss { optionsSoFar with vectorSize = minVectorSize ; changed = true }
144
+ exit 1
145
145
else
146
146
parseArgsRec xss { optionsSoFar with vectorSize = size; changed = true }
147
147
else
148
148
eprintfn " Option -vsize was followed by an invalid value."
149
- parseArgsRec xs optionsSoFar
149
+ exit 1
150
150
| _ ->
151
151
eprintfn " Option -vsize needs to be followed by a number."
152
- parseArgsRec xs optionsSoFar
152
+ exit 1
153
153
| x:: xs ->
154
154
eprintfn " Option \" %s \" is unrecognized." x
155
155
parseArgsRec xs optionsSoFar
@@ -194,16 +194,16 @@ let main argv =
194
194
195
195
let benchmarks =
196
196
match ops.benchmarks with
197
- | [] -> [ " bench1 " ; " bench2 " ]
197
+ | [] -> [ " 1 " ; " 2 " ]
198
198
| xss -> xss
199
199
200
200
let modes =
201
201
match ops.modes with
202
202
| [] -> [ " auto" ; " numeric" ]
203
203
| xss -> xss
204
204
205
- let bench1 = List.contains " bench1 " benchmarks
206
- let bench2 = List.contains " bench2 " benchmarks
205
+ let bench1 = List.contains " 1 " benchmarks
206
+ let bench2 = List.contains " 2 " benchmarks
207
207
let auto = List.contains " auto" modes
208
208
let numeric = List.contains " numeric" modes
209
209
0 commit comments