op_halide.c の compileHalide関数
引用 void compileHalide(std::vector<Mat> &outputs, Ptr<BackendNode>& node, int targetId) { #ifdef HAVE_HALIDE CV_Assert(!node.empty()); Halide::Func& top = node.dynamicCast<HalideBackendNode>()->funcs.back(); int outW, outH, outC, outN; Halide::Var x("x"), y("y"), c("c"), n("n"); getCanonicalSize(outputs[0].size, &outW, &outH, &outC, &outN); top.bound(x, 0, outW).bound(y, 0, outH) .bound(c, 0, outC).bound(n, 0, outN); Halide::Target target = Halide::get_host_target(); target.set_feature(Halide::Target::NoAsserts); if (targetId == DNN_TARGET_OPENCL) { target.set_feature(Halide::Target::OpenCL); } CV_Assert(target.supported()); top.compile_jit(target); #endif // HAVE_HALIDE }