root/test/generator/multitarget_generator.cpp

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

DEFINITIONS

This source file includes following definitions.
  1. build

#include "Halide.h"

namespace {

class Multitarget : public Halide::Generator<Multitarget> {
public:
    Func build() {
        Var x, y; 
        Func f("f");
        if (get_target().has_feature(Target::Debug)) {
            f(x, y) = cast<uint32_t>((int32_t)0xdeadbeef);
        } else {
            f(x, y) = cast<uint32_t>((int32_t)0xf00dcafe);
        }
        return f;
    }
};

Halide::RegisterGenerator<Multitarget> register_my_gen{"multitarget"};

}  // namespace

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