MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / Or

Method Or

source/util/bit_vector.cpp:41–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool BitVector::Or(const BitVector& other) {
42 auto this_it = this->bits_.begin();
43 auto other_it = other.bits_.begin();
44 bool modified = false;
45
46 while (this_it != this->bits_.end() && other_it != other.bits_.end()) {
47 auto temp = *this_it | *other_it;
48 if (temp != *this_it) {
49 modified = true;
50 *this_it = temp;
51 }
52 ++this_it;
53 ++other_it;
54 }
55
56 if (other_it != other.bits_.end()) {
57 modified = true;
58 this->bits_.insert(this->bits_.end(), other_it, other.bits_.end());
59 }
60
61 return modified;
62}
63
64std::ostream& operator<<(std::ostream& out, const BitVector& bv) {
65 out << "{";

Callers 2

TESTFunction · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by 1

TESTFunction · 0.64