fix benchmark?
This commit is contained in:
parent
3b8d9e03cd
commit
75fdb1260b
1 changed files with 7 additions and 6 deletions
|
@ -99,21 +99,22 @@ int benchmark(int argc, char **argv) {
|
|||
break;
|
||||
case 'n':
|
||||
n = atoi(optarg);
|
||||
if (n <= 0) {
|
||||
goto usage;
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
nthreads = atoi(optarg);
|
||||
if (nthreads <= 0) {
|
||||
goto usage;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto usage;
|
||||
}
|
||||
}
|
||||
|
||||
if (n <= 0) {
|
||||
goto usage;
|
||||
}
|
||||
if (nthreads < 0 && !serial) {
|
||||
goto usage;
|
||||
}
|
||||
|
||||
a = malloc(n * sizeof(int));
|
||||
|
||||
unsigned long long s = 0;
|
||||
|
|
Reference in a new issue