MCPcopy Create free account
hub / github.com/alibaba/MNN / LCA

Function LCA

codegen/OpFuse.cpp:240–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240Node* LCA(Node* x, Node* y) {
241 while (x != y) {
242 if (!x || !y) {
243 return nullptr;
244 }
245 if (x->topoIndex < y->topoIndex) {
246 x = x->domainatePred;
247 } else {
248 y = y->domainatePred;
249 }
250 }
251 return x;
252}
253bool allPathLegal(Node* s, Node* t, MNNForwardType type) {
254 bool legal = true;
255 std::queue<Node*> q;

Callers 1

opFuseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected