MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / find_oprs

Function find_oprs

src/jit/test/fusion.cpp:59–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58template <typename T>
59SmallVector<T*> find_oprs(SymbolVar endpoint) {
60 SmallVector<T*> res;
61 auto cb = [&res](cg::OperatorNodeBase* opr) {
62 if (opr->same_type<T>()) {
63 auto ptr = &(opr->cast_final_safe<T>());
64 res.push_back(ptr);
65 }
66 };
67 cg::DepOprIter{cb}.add(endpoint.node()->owner_opr());
68 return res;
69}
70
71template <typename T>
72SmallVector<T*> find_oprs(cg::AsyncExecutable& func) {

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.45
addMethod · 0.45
owner_oprMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected