MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / operator()

Method operator()

imperative/python/src/tensor.cpp:829–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827 TensorWeakRef(const TensorWrapper& tw) : data(tw.m_tensor->data()) {}
828
829 py::object operator()() {
830 if (auto p = data.lock()) {
831 return TensorWrapper::make(py_tensor_type, p);
832 }
833 return py::none();
834 }
835};
836
837#ifdef METH_FASTCALL

Callers

nothing calls this directly

Calls 2

makeFunction · 0.50
lockMethod · 0.45

Tested by

no test coverage detected