Revision 4abb1898dd808727c46e4691e2ccb466f08004e7 authored by Steven Johnson on 19 August 2020, 18:31:01 UTC, committed by Steven Johnson on 19 August 2020, 18:31:01 UTC
2 parent s eba0790 + d1f34da
Raw File
undefined_loop_level.cpp
#include "Halide.h"
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    LoopLevel undefined;

    Var x;
    Func f, g;
    f(x) = x;
    g(x) = f(x);
    f.compute_at(undefined);
    g.compute_root();

    // Trying to lower/realize with an undefined LoopLevel should be fatal
    Buffer<int> result = g.realize(1);

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