| 162 | } |
| 163 | |
| 164 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 165 | const TfLiteTensor* input = GetInput(context, node, kInputTensor); |
| 166 | TfLiteTensor* output = GetOutput(context, node, kOutputTensor); |
| 167 | const TfLiteTensor* multipliers = GetInput(context, node, kInputMultipliers); |
| 168 | |
| 169 | if (IsDynamicTensor(output)) { |
| 170 | TF_LITE_ENSURE_OK(context, ResizeOutput(context, node)); |
| 171 | } |
| 172 | |
| 173 | switch (output->type) { |
| 174 | case kTfLiteFloat32: |
| 175 | Tile<float>(*(input->dims), input, multipliers, output); |
| 176 | break; |
| 177 | case kTfLiteUInt8: |
| 178 | Tile<uint8_t>(*(input->dims), input, multipliers, output); |
| 179 | break; |
| 180 | case kTfLiteInt32: |
| 181 | Tile<int32_t>(*(input->dims), input, multipliers, output); |
| 182 | break; |
| 183 | case kTfLiteInt64: |
| 184 | Tile<int64_t>(*(input->dims), input, multipliers, output); |
| 185 | break; |
| 186 | case kTfLiteBool: |
| 187 | Tile<bool>(*(input->dims), input, multipliers, output); |
| 188 | break; |
| 189 | default: |
| 190 | context->ReportError(context, "Type '%s' is not supported by tile.", |
| 191 | TfLiteTypeGetName(output->type)); |
| 192 | return kTfLiteError; |
| 193 | } |
| 194 | return kTfLiteOk; |
| 195 | } |
| 196 | |
| 197 | } // namespace tile |
| 198 | TfLiteRegistration* Register_TILE() { |
nothing calls this directly
no test coverage detected