Let 'op_reg' release any memory it might have allocated via 'OpInit'.
| 318 | |
| 319 | // Let 'op_reg' release any memory it might have allocated via 'OpInit'. |
| 320 | void OpFree(const TfLiteRegistration& op_reg, void* buffer) { |
| 321 | if (op_reg.free == nullptr) return; |
| 322 | if (buffer) { |
| 323 | op_reg.free(&context_, buffer); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | // Prepare the given 'node' for execution. |
| 328 | TfLiteStatus OpPrepare(const TfLiteRegistration& op_reg, TfLiteNode* node); |