Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions apps/linear_algebra/benchmarks/halide_benchmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "clock.h"
#include "halide_blas.h"
#include "macros.h"
#include <iomanip>
#include <cstdlib>
#include <iostream>
#include <random>
#include <string>
Expand Down Expand Up @@ -82,6 +82,9 @@ struct BenchmarksBase {
bench_gemm_transB(size);
} else if (benchmark == "gemm_transAB") {
bench_gemm_transAB(size);
} else {
std::cerr << "subroutine: <" << benchmark << "> not known\n";
std::exit(1);
}
}

Expand Down Expand Up @@ -159,8 +162,8 @@ struct BenchmarksDouble : public BenchmarksBase<double> {

int main(int argc, char *argv[]) {
if (argc != 3) {
std::cout << "USAGE: halide_benchmarks <subroutine> <size>\n";
return 0;
std::cerr << "USAGE: halide_benchmarks <subroutine> <size>\n";
return 1;
}

std::string subroutine = argv[1];
Expand All @@ -172,6 +175,9 @@ int main(int argc, char *argv[]) {
BenchmarksFloat("Halide").run(subroutine, size);
} else if (type == 'd') {
BenchmarksDouble("Halide").run(subroutine, size);
} else {
std::cerr << "type: '" << type << "' not known. Expected 's' or 'd'.\n";
return 1;
}

return 0;
Expand Down
Loading