Halide (programming language)
Appearance
Designed by | Jonathan Ragan-Kelley and Andrew Adams |
---|---|
Developer | MIT, (with help from Stanford and Adobe) |
First appeared | 2012 |
OS | Mac OS X (10.6 through 10.8), mainstream Linux distributions |
Website | http://halide-lang.org/ |
Halide is a computer programming language designed to make it easier to write image processing code that a compiler can efficiently and automatically parallelize onto a Graphical Processing Unit (GPU) pipeline.[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
- ^ "Halide - New Language For Image Processing". 2012. Retrieved 20 September 2013.
External links
- http://halide-lang.org/
- Decoupling Algorithms from Schedules for Easy Optimization of Image Processing Pipelines
- Template:PDFlink