8namespace Autoscheduler {
10#define user_assert(c) _halide_internal_assertion(c, Halide::Internal::ErrorReport::User)
11#define EXPECT_EQ(expected, actual) expect_eq(__LINE__, expected, actual)
12#define APPROX_EQ(expected, actual, epsilon) approx_eq(__LINE__, expected, actual, epsilon)
13#define EXPECT(expected) expect(__LINE__, expected)
15template<
typename A,
typename B>
16void expect_eq(
int line,
const A &expected,
const B &actual) {
18 <<
"Assert failed on line " << line <<
"."
19 <<
"\nExpected value = " << expected
20 <<
"\nActual value = " << actual;
23template<
typename A,
typename B>
24void approx_eq(
int line,
const A &expected,
const B &actual,
float epsilon) {
26 <<
"Assert failed on line " << line <<
"."
27 <<
"\nExpected value = " << expected
28 <<
"\nActual value = " << actual;
32void expect(
int line,
const A &expected) {
34 <<
"Assert failed on line " << line <<
"."
35 <<
"\nExpected value to be true\n";
void expect(int line, const A &expected)
void approx_eq(int line, const A &expected, const B &actual, float epsilon)
void expect_eq(int line, const A &expected, const B &actual)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.