On Sat, Nov 25, 2023 at 06:59:57AM -0800, Louis Narmour wrote:
> Or rather, assuming that I can manually construct the corresponding
> union_sets (for the filter nodes), and multi_union_pw_affs (for the
> schedule_band_nodes), is there a good way to do this? I see many functions
> to “insert” nodes in the tree, but this is disallowed everywhere except the
> root it seems.
An insert should be *allowed* everywhere except at the root
(and at children of a sequence or set node).
There are some examples in earlier posts, but some of them
are about stuff not working as intended.
Here's an example that should work (using the python interface):
isl.schedule_node.from_domain("{ S0[0:9]; S1[0:9]; S2[0:9] }").child(0).insert_sequence(isl.union_set_list("({ S0[*] }, { S1[*]; S2[*] })")).child(0).child(0).insert_partial_schedule(isl.multi_union_pw_aff("[{ S0[i] -> [-i] }]")).parent().parent().child(1).child(0).insert_partial_schedule(isl.multi_union_pw_aff("[{ S1[i] -> [i]; S2[i] -> [i + 1] }]"))
skimo