Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / shape_infer / built-in / ie_equal_shape_infer.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <description_buffer.hpp>
8 #include "ie_built_in_impl.hpp"
9 #include <map>
10 #include <memory>
11 #include <string>
12 #include <vector>
13
14 namespace InferenceEngine {
15 namespace ShapeInfer {
16
17 /**
18  *@brief Implementation of Shape inference that just assign input shapes to output shapes
19  */
20 class EqualShapeProp : public BuiltInShapeInferImpl {
21 public:
22     explicit EqualShapeProp(const std::string& type) : BuiltInShapeInferImpl(type) {}
23
24     void inferShapesImpl(const std::vector<Blob::CPtr>& inBlobs, const std::map<std::string, std::string>& params,
25                          const std::map<std::string, Blob::Ptr>& blobs, std::vector<SizeVector>& outShapes) override {
26         outShapes = inShapes;
27     }
28 };
29
30 class DoNothingShapeProp : public BuiltInShapeInferImpl {
31 public:
32     explicit DoNothingShapeProp(const std::string& type) : BuiltInShapeInferImpl(type) {}
33
34     void inferShapesImpl(const std::vector<Blob::CPtr>& inBlobs, const std::map<std::string, std::string>& params,
35                          const std::map<std::string, Blob::Ptr>& blobs, std::vector<SizeVector>& outShapes) override {}
36 };
37
38 }  // namespace ShapeInfer
39 }  // namespace InferenceEngine