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

Method is_scalar

imperative/src/impl/value.cpp:69–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool ValueRef::is_scalar() const {
70 return imperative::apply(IsScalar(), *this)[0].cast<BoolValue>();
71}
72
73void ValueRef::watch() const {
74 mgb_assert(m_storage);

Callers 15

as_ndMethod · 0.45
applyFunction · 0.45
apply_transformationMethod · 0.45
is_reduce_ndim_idx_itemsFunction · 0.45
elemwise_ruleFunction · 0.45
concat_ruleFunction · 0.45
DEF_IMPLFunction · 0.45
checkMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
as_immutable_scalarMethod · 0.45

Calls 2

IsScalarClass · 0.85
applyFunction · 0.70

Tested by 6

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
reduce_rawFunction · 0.36
TESTFunction · 0.36