The transition from frequencies race to multiple cores has necessitated in-depth development of algorithms designed to overlap calculations. This became especially important in the era of GPGPU-computing, for which the OpenCL programming is becoming increasingly popular approach. But this does not exclude the possibility that some developers are trying to develop a perfect programming language for multi-core environments.
A group of undergraduate and postgraduate Artificial Intelligence Lab and Computer Science at the Massachusetts Institute of Technology (MIT CSAIL) proposed a new programming language for image processing in a multicore environment. Language, which was named Halide (by common name of two-component halide compounds, which will become clear below), solves two major problems. First, it is easier to write and test code than modern languages for image processing. Secondly, a new language can automatically optimize the code, eliminating time-consuming manual operations.
According to our tests, copied to the program Halide were about one-third longer than the programs written by skilled programmers in modern languages, but they showed a gain in speed calculations by 2, 3 and even 6 times. In a separate case, Halide calculations were 70 times faster.
The secret of new language, as the developers say, lies in its two-module basis. The program for Halide consists of two sections. One section describes the general algorithm for computing, and in the other - scheduler process. And the command in the scheduler can be changed on the fly without modifying the program code . This opens the way to experiment with new ideas that will not need to check to rewrite the program again. In addition, changing only the power scheduler we can arrange the transfer to any hardware platform.