Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / hetero_plugin / hetero_async_infer_request.h
1 //
2 // Copyright 2017-2018 Intel Corporation.
3 //
4 // This software and the related documents are Intel copyrighted materials,
5 // and your use of them is governed by the express license under which they
6 // were provided to you (End User License Agreement for the Intel(R) Software
7 // Development Products (Version May 2017)). Unless the License provides
8 // otherwise, you may not use, modify, copy, publish, distribute, disclose or
9 // transmit this software or the related documents without Intel's prior
10 // written permission.
11 //
12 // This software and the related documents are provided as is, with no
13 // express or implied warranties, other than those that are expressly
14 // stated in the License.
15 //
16
17 /**
18  * @brief a header file for IInferRequest interface
19  * @file ie_iinfer_request.hpp
20  */
21
22 #pragma once
23
24 #include <unordered_set>
25 #include <utility>
26 #include <string>
27 #include <map>
28 #include <memory>
29
30 #include "cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp"
31 #include "hetero_infer_request.h"
32
33 namespace HeteroPlugin {
34
35 class HeteroAsyncInferRequest : public InferenceEngine::AsyncInferRequestThreadSafeDefault {
36 public:
37     typedef std::shared_ptr<HeteroAsyncInferRequest> Ptr;
38
39     HeteroAsyncInferRequest(HeteroInferRequest::Ptr request,
40                             const InferenceEngine::ITaskExecutor::Ptr &taskExecutor,
41                             const InferenceEngine::TaskSynchronizer::Ptr &taskSynchronizer,
42                             const InferenceEngine::ITaskExecutor::Ptr &callbackExecutor);
43
44     void StartAsync() override;
45
46     InferenceEngine::StatusCode Wait(int64_t millis_timeout) override;
47
48     void SetCompletionCallback(InferenceEngine::IInferRequest::CompletionCallback callback) override;
49
50 private:
51     HeteroInferRequest::Ptr _heteroInferRequest;
52 };
53
54 }  // namespace HeteroPlugin
55