MCPcopy Create free account
hub / github.com/SVF-tools/SVF / operator|=

Method operator|=

svf/include/Util/SparseBitVector.h:845–879  ·  view source on GitHub ↗

Union our bitmap with the RHS and return true if we changed.

Source from the content-addressed store, hash-verified

843
844 // Union our bitmap with the RHS and return true if we changed.
845 bool operator|=(const SparseBitVector &RHS)
846 {
847 if (this == &RHS)
848 return false;
849
850 bool changed = false;
851 ElementListIter Iter1 = Elements.begin();
852 ElementListConstIter Iter2 = RHS.Elements.begin();
853
854 // If RHS is empty, we are done
855 if (RHS.Elements.empty())
856 return false;
857
858 while (Iter2 != RHS.Elements.end())
859 {
860 if (Iter1 == Elements.end() || Iter1->index() > Iter2->index())
861 {
862 Elements.insert(Iter1, *Iter2);
863 ++Iter2;
864 changed = true;
865 }
866 else if (Iter1->index() == Iter2->index())
867 {
868 changed |= Iter1->unionWith(*Iter2);
869 ++Iter1;
870 ++Iter2;
871 }
872 else
873 {
874 ++Iter1;
875 }
876 }
877 CurrElementIter = Elements.begin();
878 return changed;
879 }
880
881 // Intersect our bitmap with the RHS and return true if ours changed.
882 bool operator&=(const SparseBitVector &RHS)

Callers 1

operator |=Function · 0.45

Calls 6

indexMethod · 0.80
insertMethod · 0.80
unionWithMethod · 0.80
beginMethod · 0.45
emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected