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