This source file includes following definitions.
- build
#include "Halide.h"
class OldBufferT : public Halide::Generator<OldBufferT> {
public:
ImageParam in1 {Int(32), 2, "in1"};
ImageParam in2 {Int(32), 2, "in2"};
Param<int> scalar_param {"scalar_param", 1, 0, 64};
Func build() {
Func f, g;
Var x, y;
f(x, y) = in1(x-1, y-1) + in1(x+1, y+3) + in2(x, y) + scalar_param;
f.compute_root();
if (get_target().has_gpu_feature()) {
Var xi, yi;
f.gpu_tile(x, y, xi, yi, 16, 16);
}
g.define_extern("extern_stage", {in2, f}, Int(32), 2,
NameMangling::Default,
true );
return g;
}
};
Halide::RegisterGenerator<OldBufferT> reg{"old_buffer_t"};