def specialize(self, *args):
        '''
        Create a new instance of this dispatcher specialized for the given
        *args*.
        '''
        if self.specialized:
            raise RuntimeError('Dispatcher already specialized')

        cc = get_current_device().compute_capability
        argtypes = tuple(self.typeof_pyval(a) for a in args)

        specialization = self.specializations.get((cc, argtypes))
        if specialization:
            return specialization

        targetoptions = self.targetoptions
        specialization = CUDADispatcher(self.py_func,
                                        targetoptions=targetoptions)
        specialization.compile(argtypes)
        specialization.disable_compile()
        specialization._specialized = True
        self.specializations[cc, argtypes] = specialization
        return specialization

        Create a new instance of this dispatcher specialized for the given
        *args*.
        
numba/cuda/dispatcher.py