File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1627,6 +1627,25 @@ def test_concatenate_arrays(ctx_factory):
16271627 lp .auto_test_vs_ref (ref_t_unit , ctx , t_unit )
16281628
16291629
1630+ def test_decouple_domain (ctx_factory ):
1631+ ctx = ctx_factory ()
1632+ t_unit = lp .make_kernel (
1633+ "{[i,j]: 0<=i, j<10}" ,
1634+ """
1635+ x[i] = i
1636+ y[j] = 2*j
1637+ """ ,
1638+ name = "foo" ,
1639+ )
1640+ ref_t_unit = t_unit
1641+ t_unit = lp .decouple_domain (t_unit , {"j" }, set ())
1642+ assert (ref_t_unit ["foo" ].get_home_domain_index ("i" )
1643+ == ref_t_unit ["foo" ].get_home_domain_index ("j" ))
1644+ assert (t_unit ["foo" ].get_home_domain_index ("i" )
1645+ != t_unit ["foo" ].get_home_domain_index ("j" ))
1646+ lp .auto_test_vs_ref (ref_t_unit , ctx , t_unit )
1647+
1648+
16301649if __name__ == "__main__" :
16311650 if len (sys .argv ) > 1 :
16321651 exec (sys .argv [1 ])
You can’t perform that action at this time.
0 commit comments