Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / mkldnn_plugin / nodes / mkldnn_crop_node.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <ie_common.h>
8 #include <mkldnn_node.h>
9 #include <string>
10 #include <vector>
11
12 namespace MKLDNNPlugin {
13
14 class MKLDNNCropNode : public MKLDNNNode {
15 public:
16     MKLDNNCropNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng);
17     ~MKLDNNCropNode() override = default;
18
19     void getSupportedDescriptors() override;
20     void initSupportedPrimitiveDescriptors() override;
21     void createPrimitive() override;
22     void execute(mkldnn::stream strm) override;
23     bool created() const override;
24     bool canBeInPlace() const override {
25         return false;
26     }
27
28 private:
29     static Register<MKLDNNCropNode> reg;
30     int channelAxis = 1;
31     std::vector<int> offsets;
32     std::vector<int> dims;
33 };
34
35 }  // namespace MKLDNNPlugin
36