Revision c413e325e5481686b53586398673984df73fa57d authored by Andrew Adams on 23 February 2021, 22:26:49 UTC, committed by Andrew Adams on 23 February 2021, 22:26:49 UTC
2 parent s 69e4dff + 322ab62
Raw File
compute_with_crossing_edges2.cpp
#include "Halide.h"
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    Var x("x"), y("y");
    Func f("f"), g("g");

    f(x, y) = x + y;
    f(x, y) += 1;

    g(x, y) = x - y;
    g(x, y) += 1;

    f.compute_root();
    g.compute_root();

    f.compute_with(g.update(0), y);
    f.update(0).compute_with(g, y);

    Pipeline p({f, g});
    p.realize({200, 200});

    printf("Success!\n");
    return 0;
}
back to top