Halide Tutorial 03
halideã®ãããã°ææ³ã«ã¤ãã¦ã®ãã¥ã¼ããªã¢ã«ã C++ãªãã¸ã§ã¯ãã¯èªèº«ã®ååãæããªãã®ã§ãFunc gradient("gradient")ã¨ããã¤ãã¦ããã ãã¤ãã©ã¤ã³ã®çä¼¼ã³ã¼ããçæãããã
#include "Halide.h" #include <stdio.h> using namespace Halide; int main(int argc, char **argv) { Func gradient("gradient"); Var x("x"), y("y"); gradient(x, y) = x + y; // Halide will also output an HTML version of this output, which // supports syntax highlighting and code-folding, so it can be // nicer to read for large pipelines. Open gradient.html with your // browser after running this tutorial. gradient.compile_to_lowered_stmt("gradient.html", {}, HTML); printf("Success!\n"); return 0; }