4c39a4a076679e58e5b043dd5bcd1268fd470264
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / src / include / border_inst.h
1 // Copyright (c) 2018 Intel Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 ///////////////////////////////////////////////////////////////////////////////////////////////////
16 #pragma once
17
18 #include <api/CPP/border.hpp>
19
20 #include "primitive_inst.h"
21 #include <string>
22 #include <memory>
23
24 namespace cldnn {
25 template <>
26 struct typed_program_node<border> : typed_program_node_base<border> {
27 private:
28     using parent = typed_program_node_base<border>;
29
30 public:
31     using parent::parent;
32
33     typed_program_node(const std::shared_ptr<border> prim, program_impl& prog) : parent(prim, prog) {
34         support_padding_all(true);
35     }
36     program_node& input() const { return get_dependency(0); }
37 };
38
39 using border_node = typed_program_node<border>;
40
41 template <>
42 class typed_primitive_inst<border> : public typed_primitive_inst_base<border> {
43     using parent = typed_primitive_inst_base<border>;
44
45 public:
46     static layout calc_output_layout(border_node const& node);
47     static std::string to_string(border_node const& node);
48     typed_primitive_inst(network_impl& network, border_node const& node);
49 };
50
51 using border_inst = typed_primitive_inst<border>;
52 }  // namespace cldnn