API Reference#
Halide’s front end is embedded in C++. You build a pipeline by writing C++ code
using Halide::Var, Halide::Expr, and
Halide::Func objects, then either call
Halide::Func::compile_to_file() to generate an object file and header
(for deploying large routines ahead-of-time), or call
Halide::Func::realize() to JIT-compile and run the pipeline
immediately (good for testing small routines).
To learn Halide, start with the tutorial. The test/
directory has many small examples exercising individual features, and the
apps/ directory has larger, realistic pipelines – local_laplacian,
bilateral_grid, and interpolate are good ones to start with.
If you’re looking for a binary release, install a stable release or a nightly build with pip. If you’re building with CMake, see the Halide CMake helpers.
Where to start#
For defining, scheduling, and evaluating basic pipelines:
Halide::Func, Halide::Stage, Halide::Var
The image data type: Halide::Buffer
For passing around and reusing Halide expressions: Halide::Expr
For representing scalar and image parameters to pipelines:
Halide::Param, Halide::ImageParam
For writing functions that reduce or scatter over some domain:
Halide::RDom
For writing and evaluating functions that return multiple values:
Halide::Tuple, Halide::Realization