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

Method do_insert

imperative/src/impl/op_trait.cpp:125–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void OpTraitRegistry::do_insert(Typeinfo* type) {
126 auto&& sd = detail::static_data();
127 auto ret = sd.type2reg.emplace(type, trait);
128 mgb_assert(
129 ret.second || ret.first->second == trait,
130 "OpTrait for %s has already been registered", type->name);
131}
132
133OpTraitRegistry OpTraitRegistry::do_insert(const char* name) {
134 auto&& sd = detail::static_data();

Callers

nothing calls this directly

Calls 5

emplace_backMethod · 0.80
backMethod · 0.80
emplaceMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected