Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / hetero_plugin / hetero_plugin.h
1 //
2 // Copyright (C) 2018-2019 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 #pragma once
18 #include "inference_engine.hpp"
19 #include "ie_ihetero_plugin.hpp"
20 #include "description_buffer.hpp"
21 #include "ie_error.hpp"
22 #include <memory>
23 #include <string>
24 #include <map>
25 #include <vector>
26 #include <cpp_interfaces/impl/ie_plugin_internal.hpp>
27
28 namespace HeteroPlugin {
29
30 class Engine : public InferenceEngine::InferencePluginInternal {
31 public:
32     Engine();
33
34     void GetVersion(const InferenceEngine::Version *&versionInfo) noexcept;
35
36     InferenceEngine::ExecutableNetworkInternal::Ptr
37     LoadExeNetworkImpl(InferenceEngine::ICNNNetwork &network,
38                        const std::map<std::string, std::string> &config) override;
39     void SetConfig(const std::map<std::string, std::string> &config) override;
40
41     void SetDeviceLoader(const std::string &device, InferenceEngine::IHeteroDeviceLoader::Ptr pLoader);
42
43     void SetAffinity(InferenceEngine::ICNNNetwork& network, const std::map<std::string, std::string> &config);
44
45     void AddExtension(InferenceEngine::IExtensionPtr extension)override;
46
47     void SetLogCallback(InferenceEngine::IErrorListener &listener) override;
48 private:
49     std::vector<InferenceEngine::IExtensionPtr> _extensions;
50     InferenceEngine::MapDeviceLoaders _deviceLoaders;
51     InferenceEngine::IErrorListener* error_listener = nullptr;
52 };
53
54 }  // namespace HeteroPlugin