MCPcopy Create free account
hub / github.com/SVF-tools/SVF / intersectWith

Method intersectWith

svf/include/Util/SparseBitVector.h:432–452  ·  view source on GitHub ↗

Intersect this Element with RHS and return true if this one changed. BecameZero is set to true if this element became all-zero bits.

Source from the content-addressed store, hash-verified

430 // Intersect this Element with RHS and return true if this one changed.
431 // BecameZero is set to true if this element became all-zero bits.
432 bool intersectWith(const SparseBitVectorElement &RHS,
433 bool &BecameZero)
434 {
435 bool changed = false;
436 bool allzero = true;
437
438 BecameZero = false;
439 for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i)
440 {
441 BitWord old = changed ? 0 : Bits[i];
442
443 Bits[i] &= RHS.Bits[i];
444 if (Bits[i] != 0)
445 allzero = false;
446
447 if (!changed && old != Bits[i])
448 changed = true;
449 }
450 BecameZero = allzero;
451 return changed;
452 }
453
454 // Intersect this Element with the complement of RHS and return true if this
455 // one changed. BecameZero is set to true if this element became all-zero

Callers 1

operator&=Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected