MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / UnionWith

Method UnionWith

tensorflow/compiler/jit/device_util.cc:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void 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
47bool DeviceSet::IsEmpty() const {
48 return absl::c_all_of(storage_, [&](uint64 val) { return val == 0; });

Callers 4

MergeMethod · 0.80
AreDevicesCompatibleMethod · 0.80
MergeMethod · 0.80
AreDevicesCompatibleMethod · 0.80

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected