There are mainly two kinds of GPU programming languages: graphics APIs such as DirectX and OpenGL, and GPGPU languages such as CUDA and CTM. The former kind processes the textures through the programmable hardware pipeline, as shown in Figure
1(a). Vertices and pixel processors are employed to drive the computation. Therefore, programming with the graphics APIs can directly utilize the hardware features related to rendering and visualization. Previously, GPGPU developers used graphics APIs to map applications to the graphics rendering mechanism [16, 26].
However, this kind of mapping may be inefficient and sometimes infeasible [30].