ie_context.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 This is a header file for the IE Context class
7  * @file ie_context.hpp
8  */
9 #pragma once
10 
11 #include <ie_iextension.h>
12 
13 #include <details/caseless.hpp>
14 #include <map>
15 #include <string>
16 #include <vector>
17 
18 namespace InferenceEngine {
19 
20 /**
21  * @deprecated Use ngraph API instead.
22  * @brief This class implements object
23  */
24 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(Context) {
25 public:
26  Context();
27 
28  /**
29  * @brief Registers extension within the context
30  * @param ext Pointer to already loaded extension
31  */
32  void addExtension(const IShapeInferExtensionPtr& ext);
33 
34  /**
35  * @brief Registers Shape Infer implementation within the Context
36  * @param type Layer type
37  * @param impl Shape Infer implementation
38  */
39  void addShapeInferImpl(const std::string& type, const IShapeInferImpl::Ptr& impl);
40 
41  /**
42  * @brief Returns the shape infer implementation by layer type
43  * @param type Layer type
44  * @return Shape Infer implementation
45  */
46  IShapeInferImpl::Ptr getShapeInferImpl(const std::string& type);
47 
48 private:
49  details::caseless_map<std::string, IShapeInferImpl::Ptr> shapeInferImpls;
50 };
51 
52 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
This is a header file for Inference Engine Extension Interface.