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

Method set_opr_destruct_callback

dnn/include/megdnn/handle.h:125–127  ·  view source on GitHub ↗

! * \brief set a callback to be invoked when an operator is destructed * \param[in,out] cb the callback function; it would be set to the * previous callback function */

Source from the content-addressed store, hash-verified

123 * previous callback function
124 */
125 void set_opr_destruct_callback(thin_function<void(OperatorBase*)>& cb) {
126 cb.swap(m_on_opr_destructed);
127 }
128
129 MGE_WIN_DECLSPEC_FUC void on_opr_destructed(OperatorBase* opr);
130

Callers 2

enableMethod · 0.80
~MegDNNDtorCheckMethod · 0.80

Calls 1

swapMethod · 0.45

Tested by

no test coverage detected