fix benchmark?

This commit is contained in:
Mylloon 2024-04-18 17:20:50 +02:00
parent 3b8d9e03cd
commit 75fdb1260b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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;