Skip to content

Commit

Permalink
Fix two trivial build errors (#8467)
Browse files Browse the repository at this point in the history
* Fix two trivial build errors

- Missing #include in halide_test_dirs.h
- ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result] in parallel_scenarios.cpp

* Update halide_test_dirs.h

* Update parallel_scenarios.cpp
  • Loading branch information
steven-johnson authored Nov 7, 2024
1 parent 2f6072b commit e5b12df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/common/halide_test_dirs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// include Halide.h

#include <cassert>
#include <stdlib.h>
#include <string>

#ifdef _WIN32
Expand Down
3 changes: 2 additions & 1 deletion test/performance/parallel_scenarios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ int main(int argc, char **argv) {

auto bench_one = [&]() {
auto t1 = std::chrono::high_resolution_clock::now();
callable(i, o, memory_limit, in, out);
// Ignore error code because default halide_error() will abort on failure
(void)callable(i, o, memory_limit, in, out);
auto t2 = std::chrono::high_resolution_clock::now();
return 1e9 * std::chrono::duration<float>(t2 - t1).count() / (i * o);
};
Expand Down

0 comments on commit e5b12df

Please sign in to comment.