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

Method Merge

tensorflow/compiler/xla/union_find.h:52–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51template <typename T>
52void UnionFind<T>::Merge(UnionFind* other) {
53 UnionFind<T>* a = FindRoot();
54 UnionFind<T>* b = other->FindRoot();
55 if (a == b) return;
56 if (a->rank_ > b->rank_) {
57 b->parent_ = a;
58 a->size_ += b->size_;
59 return;
60 }
61
62 a->parent_ = b;
63 if (a->rank_ == b->rank_) {
64 b->rank_++;
65 }
66 b->value_ = a->value_;
67 b->size_ += a->size_;
68}
69
70template <typename T>
71UnionFind<T>* UnionFind<T>::FindRoot() {

Callers 15

_ReadFileToProtoMethod · 0.45
strip_unused_from_filesFunction · 0.45
read_saved_modelFunction · 0.45
_parse_input_graph_protoFunction · 0.45
_parse_input_saver_protoFunction · 0.45
mainFunction · 0.45
testOldGraphMethod · 0.45
testCreateWithProtoMethod · 0.45

Calls 1

FindRootMethod · 0.45