Trisha Shetty (Editor)

Halide (programming language)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Paradigm
  
functional, parallel

Typing discipline
  
static

First appeared
  
2012

Implementation language
  
C++

Designed by
  
Jonathan Ragan-Kelley and Andrew Adams

Developer
  
MIT, (with help from Stanford and Adobe)

Halide is a computer programming language designed for writing digital image processing code that takes advantage of memory locality, vectorized computation and multi-core CPUs and GPUs. Halide is implemented as an internal DSL in C++.

The main innovation Halide brings is the separation of the algorithm being implemented from its execution schedule, i.e. code specifying the loop nesting, parallelization, loop unrolling and vector instruction. These two are usually interleaved together and experimenting with changing the schedule requires the programmer to rewrite large portions of the algorithm with every change. With Halide, changing the schedule does not require any changes to the algorithm and this allows the programmer to experiment with scheduling and finding the most efficient one.

Sample source code

The following function defines and sets the schedule for a 3x3 box filter defined as a series of two 3x1 passes:

References

Halide (programming language) Wikipedia