| 78 | } |
| 79 | |
| 80 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 81 | const TfLiteTensor* cond_tensor = |
| 82 | GetInput(context, node, kInputConditionTensor); |
| 83 | TfLiteTensor* output = GetOutput(context, node, kOutputTensor); |
| 84 | |
| 85 | if (IsDynamicTensor(output)) { |
| 86 | TF_LITE_ENSURE_OK(context, |
| 87 | ResizeOutputTensor(context, cond_tensor, output)); |
| 88 | } |
| 89 | |
| 90 | reference_ops::SelectTrueCoords(GetTensorShape(cond_tensor), |
| 91 | GetTensorData<bool>(cond_tensor), |
| 92 | GetTensorData<int32_t>(output)); |
| 93 | return kTfLiteOk; |
| 94 | } |
| 95 | } // namespace where |
| 96 | |
| 97 | TfLiteRegistration* Register_WHERE() { |
nothing calls this directly
no test coverage detected