| 156 | } |
| 157 | |
| 158 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 159 | OneHotContext op_context{context, node}; |
| 160 | |
| 161 | if (IsDynamicTensor(op_context.output)) { |
| 162 | ResizeOutputTensor(context, op_context); |
| 163 | } |
| 164 | |
| 165 | switch (op_context.output->type) { |
| 166 | case kTfLiteFloat32: |
| 167 | OneHotCompute<float>(op_context); |
| 168 | break; |
| 169 | case kTfLiteInt32: |
| 170 | OneHotCompute<int>(op_context); |
| 171 | break; |
| 172 | case kTfLiteInt64: |
| 173 | OneHotCompute<int64_t>(op_context); |
| 174 | break; |
| 175 | case kTfLiteBool: |
| 176 | OneHotCompute<bool>(op_context); |
| 177 | break; |
| 178 | default: |
| 179 | return kTfLiteError; |
| 180 | } |
| 181 | |
| 182 | return kTfLiteOk; |
| 183 | } |
| 184 | |
| 185 | } // namespace one_hot |
| 186 |
nothing calls this directly
no test coverage detected