root/test/correctness/shared_self_references.cpp

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

#include "Halide.h"
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    // Check that recursive references get tracked properly
    {
        Func f;
        Var x;
        f(x) = x;
        {
            Expr e = f(2);
            f(0) = e;
            f(1) = e;
        } // Destroy e
    } // Destroy f

    // f should have been cleaned up. valgrind will complain if it
    // hasn't been.

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

/* [<][>][^][v][top][bottom][index][help] */