Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / ie_layers_internal.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6 #include <tuple>
7 #include "ie_api.h"
8 #include "ie_layers.h"
9 #include "ie_util_internal.hpp"
10
11 namespace InferenceEngine {
12
13 class INFERENCE_ENGINE_API_CLASS(Paddings) {
14 public:
15     PropertyVector<unsigned int> begin;
16     PropertyVector<unsigned int> end;
17 };
18
19 /**
20  * @brief gets padding with runtime type check
21  */
22 INFERENCE_ENGINE_API_CPP(Paddings) getPaddingsImpl(const CNNLayer &layer);
23
24 /**
25  * @brief gets padding without compile-time type check
26  */
27 template <class T>
28 inline  typename std::enable_if<is_one_of<T,
29                                           DeconvolutionLayer,
30                                           ConvolutionLayer,
31                                           BinaryConvolutionLayer,
32                                           PoolingLayer>::value, Paddings>::type
33 getPaddings(const T & layer) {
34     return getPaddingsImpl(layer);
35 }
36
37
38 }  // namespace InferenceEngine