| 59 | : runtime_(std::move(runtime)) {} |
| 60 | |
| 61 | Status Execute() final { |
| 62 | std::lock_guard<std::mutex> lock(guard_); |
| 63 | if (state_ != InferenceContextState::NOT_STARTED) { |
| 64 | return FailedPreconditionError("InferenceContext is not reset"); |
| 65 | } |
| 66 | state_ = InferenceContextState::IN_PROGRESS; |
| 67 | return runtime_->Execute(); |
| 68 | } |
| 69 | |
| 70 | Status Reset() final { |
| 71 | std::lock_guard<std::mutex> lock(guard_); |
no test coverage detected