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

Function tp_richcompare

imperative/python/src/ops.cpp:186–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186PyObject* PyOp(OpDef)::tp_richcompare(PyObject* self, PyObject* other, int op) {
187 bool same = reinterpret_cast<PyOp(OpDef)*>(self)->op->is_same(
188 *reinterpret_cast<PyOp(OpDef)*>(other)->op);
189 if (op == Py_EQ || op == Py_NE) {
190 RETURN_RICHCOMPARE(same, true, op);
191 }
192 Py_RETURN_NOTIMPLEMENTED;
193}
194
195template <typename T>
196struct EnumTrait;

Callers

nothing calls this directly

Calls 2

loadFunction · 0.70
is_sameMethod · 0.45

Tested by

no test coverage detected