Revision a0fc7fafeee3a6678887d8c8e86c47def4572526 authored by Alexander Root on 04 February 2021, 01:13:53 UTC, committed by GitHub on 04 February 2021, 01:13:53 UTC
* add fixes to overflow analysis in bounds inference

Co-authored-by: Steven Johnson <srj@google.com>
1 parent dadbcbf
Raw File
bad_rvar_order.cpp
#include "Halide.h"
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    RDom r1(0, 10, 0, 10);

    Func f("f");
    Var x, y;
    f(x, y) = x + y;
    f(r1.x, r1.y) += f(r1.y, r1.x);

    // It's not permitted to change the relative ordering of reduction
    // domain variables when it could change the meaning.
    f.update().reorder(r1.y, r1.x);

    f.realize(10, 10);

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