ie_plugin_dispatcher.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @brief A header for a class to handle plugin loading.
7  * @file ie_plugin_dispatcher.hpp
8  */
9 #pragma once
10 
11 #include <cpp/ie_plugin_cpp.hpp>
12 #include <string>
13 #include <vector>
14 
15 #include "ie_plugin_ptr.hpp"
16 
17 namespace InferenceEngine {
18 
19 /**
20  * @deprecated Use InferenceEngine::Core instead.
21  * @brief This is a class to load a suitable plugin
22  */
23 class INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::Core instead which dispatches plugin automatically."
24  "Will be removed in 2020 R2") INFERENCE_ENGINE_API_CLASS(PluginDispatcher) {
25 public:
26  /**
27  * @brief A constructor
28  * @param pp Vector of paths to plugin directories
29  */
30  explicit PluginDispatcher(const std::vector<file_name_t>& pp = {file_name_t()});
31 
32  IE_SUPPRESS_DEPRECATED_START
33 
34  /**
35  * @brief Loads a plugin from plugin directories
36  * @param name Plugin name
37  * @return A pointer to the loaded plugin
38  */
39  virtual InferencePlugin getPluginByName(const file_name_t& name) const;
40 
41  /**
42  * @deprecated Use InferenceEngine::Core to work with devices by name
43  * @brief Loads a plugin from directories that is suitable for the device string
44  * @param deviceName A string value representing target device
45  * @return A pointer to the plugin
46  */
47  InferencePlugin getPluginByDevice(const std::string& deviceName) const;
48 
49  IE_SUPPRESS_DEPRECATED_END
50 
51 protected:
52  /**
53  * @brief Creates path to the plugin
54  * @param path Path to the plugin
55  * @param input Plugin name
56  * @return The path to the plugin
57  */
58  file_name_t make_plugin_name(const file_name_t& path, const file_name_t& input) const;
59 
60 private:
61  std::vector<file_name_t> pluginDirs;
62 };
63 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
A header file contains a wrapper class for handling plugin instantiation and releasing resources...
class Use ngraph API NN Builder API will be removed in R2(PortInfo)
This class contains a pair from layerId and port index.
Definition: ie_network.hpp:34
This is a header file for the Inference Engine plugin C++ API.