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

Method get

src/opr/impl/cond.cpp:152–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151public:
152 static GlobalRegistry* get(ComputingGraph& graph) {
153 using namespace cg::event;
154 auto ptr = graph.options().user_data.get_user_data_or_create<GlobalRegistry>();
155 if (!ptr->m_opr_insert_handler) {
156 ptr->m_opr_insert_handler = graph.event().register_receiver<OprInserted>(
157 [ptr](const OprInserted& ev) {
158 if (!ev.is_dedup && !ev.exc) {
159 ptr->on_new_opr(ev.opr);
160 }
161 });
162 }
163 return ptr;
164 }
165
166 //! get mask if var is conditional, or nullptr otherwise
167 ExecutionMask* get_mask_from_var(VarNode* var) const {

Callers 4

on_new_oprMethod · 0.45
out_var_from_maskMethod · 0.45
scn_do_executeMethod · 0.45

Calls 1

on_new_oprMethod · 0.80

Tested by

no test coverage detected