File tree 1 file changed +19
-0
lines changed
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):
1627
1627
lp .auto_test_vs_ref (ref_t_unit , ctx , t_unit )
1628
1628
1629
1629
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
+
1630
1649
if __name__ == "__main__" :
1631
1650
if len (sys .argv ) > 1 :
1632
1651
exec (sys .argv [1 ])
You can’t perform that action at this time.
0 commit comments