Gets an TfLiteIntArray* representing the execution plan. The interpreter owns this memory and it is only guaranteed to exist during the invocation of the delegate prepare.
| 393 | // this memory and it is only guaranteed to exist during the invocation of the |
| 394 | // delegate prepare. |
| 395 | TfLiteStatus Subgraph::GetExecutionPlan(TfLiteIntArray** execution_plan) { |
| 396 | // TODO(aselle): Do not make a copy here |
| 397 | plan_cache_.reset(TfLiteIntArrayCreate(execution_plan_.size())); |
| 398 | *execution_plan = plan_cache_.get(); |
| 399 | static_assert(sizeof(plan_cache_->data[0]) == sizeof(execution_plan_[0]), |
| 400 | "TfLiteIntArray and execution_plan do not contain same type."); |
| 401 | std::memcpy(plan_cache_->data, execution_plan_.data(), |
| 402 | sizeof(plan_cache_->data[0]) * execution_plan_.size()); |
| 403 | return kTfLiteOk; |
| 404 | } |
| 405 | |
| 406 | // WARNING: This is an experimental interface that is subject to change. |
| 407 | // Entry point for C node plugin API to get the execution plan |