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

Function find_opr_num

src/jit/test/fusion.cpp:47–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46template <typename T>
47size_t find_opr_num(SymbolVar endpoint) {
48 size_t opr_num = 0;
49 auto cb = [&opr_num](cg::OperatorNodeBase* opr) {
50 if (opr->same_type<T>()) {
51 opr_num++;
52 }
53 };
54 cg::DepOprIter{cb}.add(endpoint.node()->owner_opr());
55 return opr_num;
56}
57
58template <typename T>
59SmallVector<T*> find_oprs(SymbolVar endpoint) {

Callers

nothing calls this directly

Calls 3

addMethod · 0.45
owner_oprMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected