'Bind kernel to device'

def bind(self):

    (ctx, entry) = self._cacheprog.get()
    if (entry.symbol.kernarg_segment_size > 0):
        kernarg_type = (ctypes.c_byte * entry.symbol.kernarg_segment_size)
        kernargs = entry.kernarg_region.allocate(kernarg_type)
    else:
        kernargs = None
    return (ctx, entry.symbol, kernargs, entry.kernarg_region)
