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 @@ -1743,6 +1743,25 @@ def test_duplicate_iname_not_read_only_nested(ctx_factory: cl.CtxFactory):
17431743 lp .auto_test_vs_ref (ref_t_unit , ctx , t_unit )
17441744
17451745
1746+ def test_decouple_domain (ctx_factory ):
1747+ ctx = ctx_factory ()
1748+ t_unit = lp .make_kernel (
1749+ "{[i,j]: 0<=i, j<10}" ,
1750+ """
1751+ x[i] = i
1752+ y[j] = 2*j
1753+ """ ,
1754+ name = "foo" ,
1755+ )
1756+ ref_t_unit = t_unit
1757+ t_unit = lp .decouple_domain (t_unit , {"j" }, set ())
1758+ assert (ref_t_unit ["foo" ].get_home_domain_index ("i" )
1759+ == ref_t_unit ["foo" ].get_home_domain_index ("j" ))
1760+ assert (t_unit ["foo" ].get_home_domain_index ("i" )
1761+ != t_unit ["foo" ].get_home_domain_index ("j" ))
1762+ lp .auto_test_vs_ref (ref_t_unit , ctx , t_unit )
1763+
1764+
17461765if __name__ == "__main__" :
17471766 import sys
17481767 if len (sys .argv ) > 1 :
You can’t perform that action at this time.
0 commit comments