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

Method Insert

tensorflow/compiler/jit/device_util.cc:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using xla::StatusOr;
25
26void DeviceSet::Insert(DeviceId device_id) {
27 int word_index = device_id.id() / kWordSize;
28 int bit_index = device_id.id() % kWordSize;
29
30 if (word_index >= storage_.size()) {
31 storage_.resize(word_index + 1, 0);
32 }
33
34 storage_[word_index] |= (1ull << bit_index);
35}
36
37void DeviceSet::UnionWith(const DeviceSet& other) {
38 if (other.storage_.size() > storage_.size()) {

Callers 6

InferDeviceForClusterFunction · 0.45
InferDeviceForClusterFunction · 0.45
PickDeviceHelperFunction · 0.45

Calls 3

idMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by 2

PickDeviceHelperFunction · 0.36