This source file includes following definitions.
- main
#include "Halide.h"
#include <stdio.h>
using namespace Halide;
int main(int argc, char **argv) {
Func f, g;
Var x, y;
RDom r(-10, 20);
f(x, y) = 17;
f(r, y) = f(r-1, y) + 100;
g(x, y) = f(x+5, y+5);
f.compute_root();
Buffer<int> result = g.realize(10, 1);
for (int i = 0; i < 10; i++) {
int correct = i < 5 ? (1617 + i*100) : 17;
if (result(i, 0) != correct) {
printf("Value at %d should have been %d but was instead %d\n", i, correct, result(i, 0));
return -1;
}
}
printf("Success!\n");
return 0;
}