Jump to content

Halide (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DaBler (talk | contribs) at 14:47, 2 December 2013 (added sample source code from front page http://halide-lang.org/). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Unreviewed

Halide
Designed byJonathan Ragan-Kelley and Andrew Adams
DeveloperMIT, (with help from Stanford and Adobe)
First appeared2012
OSMac OS X (10.6 through 10.8), mainstream Linux distributions
Websitehttp://halide-lang.org/

Halide is a computer programming language designed specifically to make easy write high-performance image processing code, automating the process of parallelization algorithm.[1]

Sample source code

Func blur_3x3(Func input) {
  Func blur_x, blur_y;
  Var x, y, xi, yi;

  // The algorithm - no storage or order
  blur_x(x, y) = (input(x-1, y) + input(x, y) + input(x+1, y))/3;
  blur_y(x, y) = (blur_x(x, y-1) + blur_x(x, y) + blur_x(x, y+1))/3;

  // The schedule - defines order, locality; implies storage
  blur_y.tile(x, y, xi, yi, 256, 32)
        .vectorize(xi, 8).parallel(y);
  blur_x.compute_at(blur_y, x).vectorize(x, 8);

  return blur_y;
}

References

  1. ^ "Halide - New Language For Image Processing". 2012. Retrieved 20 September 2013.