This source file includes following definitions.
- h_assert
- main
#include "Halide.h"
#include <stdio.h>
#include <cmath>
using namespace Halide;
void h_assert(bool condition, const char* msg) {
if (!condition) {
printf("FAIL: %s\n", msg);
abort();
}
}
int main() {
const float largeNum = (float)(1<<16);
h_assert(!std::isnan(largeNum), "largeNum should not be NaN");
h_assert(!std::isinf(largeNum), "largeNum should not be inf");
float16_t fail(largeNum, RoundingMode::ToNearestTiesToEven);
fail.is_infinity();
printf("Should not be reached!\n");
return 0;
}