| 173 | } |
| 174 | |
| 175 | TfLiteStatus MaxEval(TfLiteContext* context, TfLiteNode* node) { |
| 176 | auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data); |
| 177 | OpData data; |
| 178 | |
| 179 | const TfLiteTensor* input = GetInput(context, node, kInputTensor); |
| 180 | TfLiteTensor* output = GetOutput(context, node, kOutputTensor); |
| 181 | |
| 182 | TF_LITE_ENSURE_STATUS(CalculateOpData(context, params, input, output, &data)); |
| 183 | |
| 184 | switch (input->type) { |
| 185 | case kTfLiteFloat32: |
| 186 | MaxEvalFloat(context, node, params, &data, input, output); |
| 187 | break; |
| 188 | case kTfLiteUInt8: |
| 189 | MaxEvalQuantizedUInt8(context, node, params, &data, input, output); |
| 190 | break; |
| 191 | default: |
| 192 | context->ReportError(context, "Type %s not currently supported.", |
| 193 | TfLiteTypeGetName(input->type)); |
| 194 | return kTfLiteError; |
| 195 | } |
| 196 | return kTfLiteOk; |
| 197 | } |
| 198 | |
| 199 | } // namespace pooling |
| 200 |
nothing calls this directly
no test coverage detected