| 35 | } |
| 36 | |
| 37 | void DeviceSet::UnionWith(const DeviceSet& other) { |
| 38 | if (other.storage_.size() > storage_.size()) { |
| 39 | storage_.resize(other.storage_.size(), 0); |
| 40 | } |
| 41 | |
| 42 | for (int i = 0; i < other.storage_.size(); i++) { |
| 43 | storage_[i] |= other.storage_[i]; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | bool DeviceSet::IsEmpty() const { |
| 48 | return absl::c_all_of(storage_, [&](uint64 val) { return val == 0; }); |
no test coverage detected