def get_array_names(symbols):
    """Given a set of symbols, return a set of source array names and
    a set of destination array names.
    """
    src_arrays = set(x for x in symbols
                     if x.startswith('s_') and x != 's_idx')
    dest_arrays = set(x for x in symbols
                      if x.startswith('d_') and x != 'd_idx')
    return src_arrays, dest_arrays