| 93 | } |
| 94 | |
| 95 | TfLiteStatus CheckValue(TfLiteContext* context, const TfLiteTensor* input) { |
| 96 | const int64_t num_elements = NumElements(input); |
| 97 | const int32_t* data = GetTensorData<int32_t>(input); |
| 98 | for (int i = 0; i < num_elements; ++i) { |
| 99 | if (data[i] < 0) { |
| 100 | context->ReportError(context, |
| 101 | "POW does not support negative value for int32."); |
| 102 | return kTfLiteError; |
| 103 | } |
| 104 | } |
| 105 | return kTfLiteOk; |
| 106 | } |
| 107 | |
| 108 | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { |
| 109 | OpData* data = reinterpret_cast<OpData*>(node->user_data); |
no test coverage detected