def data_ptr(array):
    """Given an Array, get a Buffer that starts at the right offset

    This fails unless ``array.offset`` is a multiple of
    ``queue.device.mem_base_addr_align``, which is rare, so this isn't really
    a good function.
    """
    if array.offset:
        return array.base_data.get_sub_region(array.offset, 1)
    else:
        return array.base_data
