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

Method watch

imperative/src/impl/value.cpp:73–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ValueRef::watch() const {
74 mgb_assert(m_storage);
75 storage()->m_watching++;
76 nr_watched_values++;
77 storage()->on_watch();
78 // TODO:
79 // imperative::apply(Watch(), this);
80}
81
82void ValueRef::unwatch() const {
83 mgb_assert(m_storage);

Callers 6

_watchMethod · 0.80
watch_valueFunction · 0.80
on_watchMethod · 0.80
on_watchMethod · 0.80
on_watchMethod · 0.80
on_watchMethod · 0.80

Calls 1

on_watchMethod · 0.45

Tested by

no test coverage detected