| 36 | const char* kOpName = "SimpleOpEval"; |
| 37 | |
| 38 | TfLiteStatus SimpleOpEval(TfLiteContext* context, TfLiteNode* node) { |
| 39 | const TfLiteTensor* input1 = tflite::GetInput(context, node, /*index=*/0); |
| 40 | const TfLiteTensor* input2 = tflite::GetInput(context, node, /*index=*/1); |
| 41 | |
| 42 | TfLiteTensor* output = GetOutput(context, node, /*index=*/0); |
| 43 | |
| 44 | int32_t* output_data = output->data.i32; |
| 45 | *output_data = *(input1->data.i32) + *(input2->data.i32); |
| 46 | return kTfLiteOk; |
| 47 | } |
| 48 | |
| 49 | const char* SimpleOpProfilingString(const TfLiteContext* context, |
| 50 | const TfLiteNode* node) { |