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

Method get_value_by_id

imperative/src/impl/value.cpp:167–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167ValueRef Value::get_value_by_id(uint64_t id) {
168 auto& weak_value = registered_values[id];
169 if (auto value = weak_value.lock()) {
170 return value;
171 }
172 return {};
173}
174
175void Value::begin_record_values() {
176 mgb_assert(!recording_values);

Callers

nothing calls this directly

Calls 1

lockMethod · 0.45

Tested by

no test coverage detected