Generalizing code of OpenCL compilers