File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import islpy as isl
2+ from islpy import oppool as oppool
3+
4+
5+ def test_pooled_basic_set_intersect ():
6+ ctx = isl .DEFAULT_CONTEXT
7+ pool = oppool .ISLOpMemoizer ()
8+ set1 = oppool .NormalizedISLBasicSet .read_from_str (ctx , "{[i]: 0<=i<10}" )
9+ set2 = oppool .NormalizedISLBasicSet .read_from_str (ctx , "{[i]: 0<=i<5}" )
10+
11+ set3 = oppool .NormalizedISLBasicSet .read_from_str (ctx , "{[j]: 0<=j<10}" )
12+ set4 = oppool .NormalizedISLBasicSet .read_from_str (ctx , "{[j]: 0<=j<5}" )
13+
14+ set1_and_set2 = set1 .intersect (pool , set2 )
15+ set3_and_set4 = set3 .intersect (pool , set4 )
16+
17+ assert set1_and_set2 .ground_obj is set3_and_set4 .ground_obj
18+
19+
20+ if __name__ == "__main__" :
21+ import sys
22+ if len (sys .argv ) > 1 :
23+ exec (sys .argv [1 ])
24+ else :
25+ from pytest import main
26+ main ([__file__ ])
You can’t perform that action at this time.
0 commit comments