| 28 | using ::testing::ElementsAreArray; |
| 29 | |
| 30 | TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteDelegate* delegate, |
| 31 | const std::vector<int>& supported_nodes) { |
| 32 | TfLiteIntArray* size_and_nodes = |
| 33 | ConvertVectorToTfLiteIntArray(supported_nodes); |
| 34 | TF_LITE_ENSURE_STATUS(context->ReplaceNodeSubsetsWithDelegateKernels( |
| 35 | context, flex::GetKernel(), size_and_nodes, delegate)); |
| 36 | TfLiteIntArrayFree(size_and_nodes); |
| 37 | return kTfLiteOk; |
| 38 | } |
| 39 | |
| 40 | // There is no easy way to pass a parameter into the TfLiteDelegate's |
| 41 | // 'prepare' function, so we keep a global map for testing purpused. |
no test coverage detected