Changed OpenCLProgram to template including IndexDimenion as parameter.