Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / src / include / pyramid_roi_align_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 #pragma once
16 #include "api/CPP/pyramid_roi_align.hpp"
17 #include "primitive_inst.h"
18
19 #include <memory>
20
21 namespace cldnn {
22     template <>
23     struct typed_program_node<pyramid_roi_align> : public typed_program_node_base<pyramid_roi_align>
24     {
25         using parent = typed_program_node_base<pyramid_roi_align>;
26
27     public:
28         typed_program_node(std::shared_ptr<primitive> prim, program_impl& prog)
29              : parent(prim, prog)
30             {}
31
32         program_node& input() const { return get_dependency(0); }
33         program_node& boxes() const { return get_dependency(0); }
34         program_node& image_meta() const { return get_dependency(1); }
35         program_node& P2() const { return get_dependency(2); }
36         program_node& P3() const { return get_dependency(3); }
37         program_node& P4() const { return get_dependency(4); }
38         program_node& P5() const { return get_dependency(5); }
39         program_node& pool_size() const { return get_dependency(6); }
40     };
41
42     using pyramidROIAlign_node = typed_program_node<pyramid_roi_align>;
43
44     template <>
45     class typed_primitive_inst<pyramid_roi_align> : public typed_primitive_inst_base<pyramid_roi_align>
46     {
47         using parent = typed_primitive_inst_base<pyramid_roi_align>;
48
49     public:
50         static layout calc_output_layout(pyramidROIAlign_node const& node);
51         static std::string to_string(pyramidROIAlign_node const& node);
52         typed_primitive_inst(network_impl& network, pyramidROIAlign_node const& node);
53
54         memory_impl& boxes() const { return dep_memory(0); }
55         memory_impl& image_meta() const { return dep_memory(1); }
56         memory_impl& P2() const { return dep_memory(2); }
57         memory_impl& P3() const { return dep_memory(3); }
58         memory_impl& P4() const { return dep_memory(4); }
59         memory_impl& P5() const { return dep_memory(5); }
60         memory_impl& pool_size() const { return dep_memory(6); }
61     };
62
63     using pyramid_roi_align_inst = typed_primitive_inst<pyramid_roi_align>;
64 }