forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
async_infer_request.hpp
34 lines (28 loc) · 1.05 KB
/
async_infer_request.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "schedule.hpp"
#include "infer_request.hpp"
#ifdef MULTIUNITTEST
#define MOCKTESTMACRO virtual
#define MultiDevicePlugin MockMultiDevicePlugin
#else
#define MOCKTESTMACRO
#endif
namespace MultiDevicePlugin {
class AsyncInferRequest : public IE::AsyncInferRequestThreadSafeDefault {
public:
using Ptr = std::shared_ptr<AsyncInferRequest>;
explicit AsyncInferRequest(const Schedule::Ptr& schedule, const IInferPtr& inferRequest,
const IE::ITaskExecutor::Ptr& callbackExecutor);
void Infer_ThreadUnsafe() override;
std::map<std::string, IE::InferenceEngineProfileInfo> GetPerformanceCounts() const override;
~AsyncInferRequest();
protected:
Schedule::Ptr _schedule;
WorkerInferRequest* _workerInferRequest = nullptr;
IInferPtr _inferRequest;
};
} // namespace MultiDevicePlugin