| 124 | } |
| 125 | |
| 126 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 127 | const TfLiteTensor* start = GetInput(context, node, kStartTensor); |
| 128 | const TfLiteTensor* limit = GetInput(context, node, kLimitTensor); |
| 129 | const TfLiteTensor* delta = GetInput(context, node, kDeltaTensor); |
| 130 | |
| 131 | TfLiteTensor* output = GetOutput(context, node, kOutputTensor); |
| 132 | |
| 133 | if (IsDynamicTensor(output)) { |
| 134 | TF_LITE_ENSURE_OK(context, |
| 135 | ResizeOutput(context, start, limit, delta, output)); |
| 136 | } |
| 137 | |
| 138 | switch (output->type) { |
| 139 | case kTfLiteInt32: { |
| 140 | EvalImpl<int32_t>(start, delta, output); |
| 141 | break; |
| 142 | } |
| 143 | case kTfLiteFloat32: { |
| 144 | EvalImpl<float>(start, delta, output); |
| 145 | break; |
| 146 | } |
| 147 | default: { |
| 148 | context->ReportError(context, "Unsupported data type: %d", output->type); |
| 149 | return kTfLiteError; |
| 150 | } |
| 151 | } |
| 152 | return kTfLiteOk; |
| 153 | } |
| 154 | |
| 155 | } // namespace |
| 156 | } // namespace range |
nothing calls this directly
no test coverage detected