'Returns (cubin, size)
cubin is a pointer to a internal buffer of cubin owned
by the linker; thus, it should be loaded before the linker
is destroyed.'

def complete(self):

    cubin = c_void_p(0)
    size = c_size_t(0)
    try:
        driver.cuLinkComplete(self.handle, byref(cubin), byref(size))
    except CudaAPIError as e:
        raise LinkerError(('%s\n%s' % (e, self.error_log)))
    size = size.value
    assert (size > 0), 'linker    returned    a    zero    sized    cubin'
    del self._keep_alive[:]
    return (cubin, size)
