Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. Its front end is embedded in C++. Compiler targets include x86/SSE, ARM v7/NEON, CUDA, Native Client, OpenCL, and Metal.

You build a Halide program by writing C++ code using objects of type Halide::Var, Halide::Expr, and Halide::Func, and then calling Halide::Func::compile_to_file to generate an object file and header (good for deploying large routines), or calling Halide::Func::realize to JIT-compile and run the pipeline immediately (good for testing small routines).

To learn Halide, we recommend you start with the tutorials.

You can also look in the test folder for many small examples that use Halide's various features, and in the apps folder for some larger examples that statically compile halide pipelines. In particular check out local_laplacian, bilateral_grid, and interpolate.

Below are links to the documentation for the important classes in Halide.

For defining, scheduling, and evaluating basic pipelines:

Halide::Func, Halide::Stage, Halide::Var

Our image data type:


For passing around and reusing halide expressions:


For representing scalar and image parameters to pipelines:

Halide::Param, Halide::ImageParam

For writing functions that reduce or scatter over some domain:


For writing and evaluating functions that return multiple values:

Halide::Tuple, Halide::Realization