| 31 | }; |
| 32 | |
| 33 | void* Init(TfLiteContext* context, const char* buffer, size_t length) { |
| 34 | auto* op_data = new OpData; |
| 35 | const auto* params = reinterpret_cast<const TfLiteIfParams*>(buffer); |
| 36 | op_data->then_subgraph_index = params->then_subgraph_index; |
| 37 | op_data->else_subgraph_index = params->else_subgraph_index; |
| 38 | return op_data; |
| 39 | } |
| 40 | |
| 41 | void Free(TfLiteContext* context, void* buffer) { |
| 42 | delete reinterpret_cast<OpData*>(buffer); |
no outgoing calls