| 733 | } |
| 734 | } |
| 735 | void p_array_int_element2d(FlatZincSpace& s, const ConExpr& ce, |
| 736 | AST::Node* ann) { |
| 737 | bool isConstant = true; |
| 738 | AST::Array* a = ce[2]->getArray(); |
| 739 | for (int i=a->a.size(); i--;) { |
| 740 | if (!a->a[i]->isInt()) { |
| 741 | isConstant = false; |
| 742 | break; |
| 743 | } |
| 744 | } |
| 745 | IntVar selector0 = s.arg2IntVar(ce[0]); |
| 746 | IntVar selector1 = s.arg2IntVar(ce[1]); |
| 747 | IntSet idxset0 = s.arg2intset(ce[3]); |
| 748 | IntSet idxset1 = s.arg2intset(ce[4]); |
| 749 | |
| 750 | int w = idxset1.size(); |
| 751 | int s1off = idxset1.min(); |
| 752 | int h = idxset0.size(); |
| 753 | int s0off = idxset0.min(); |
| 754 | |
| 755 | if (isConstant) { |
| 756 | IntSharedArray sia = s.arg2intsharedarray(ce[2], 0); |
| 757 | element(s, sia, selector1, -s1off, w, selector0, -s0off, h, s.arg2IntVar(ce[5]), s.ann2ipl(ann)); |
| 758 | } else { |
| 759 | IntVarArgs iv = s.arg2intvarargs(ce[2], 0); |
| 760 | element(s, iv, selector1, -s1off, w, selector0, -s0off, h, s.arg2IntVar(ce[5]), s.ann2ipl(ann)); |
| 761 | } |
| 762 | } |
| 763 | void p_array_bool_element(FlatZincSpace& s, const ConExpr& ce, |
| 764 | AST::Node* ann) { |
| 765 | bool isConstant = true; |
nothing calls this directly
no test coverage detected