def METHOD_NAME(self, letter, argsort, params):
    defstpl = Template(_tmpl.defines)
    defs = defstpl.render(
            NS="\\", argsort=argsort, inc=params[0], dir=params[1],
            dtype=params[2], idxtype=params[3],
            dsize=params[4], nsize=params[5])
    kid = Template(self.kernels_srcs[letter]).render(argsort=argsort)
    prg = cl.Program(self.context, defs + kid).build()
    return prg