Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / src / include / one_hot_inst.h
1 // Copyright (c) 2019 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/one_hot.hpp>
19
20 #include "primitive_inst.h"
21
22
23 namespace cldnn
24 {
25     template <>
26     struct typed_program_node<one_hot> : typed_program_node_base<one_hot>
27     {
28     private:
29         using parent = typed_program_node_base<one_hot>;
30
31     public:
32         using parent::parent;
33
34         typed_program_node(const std::shared_ptr<one_hot> prim, program_impl& prog) : parent(prim, prog) { support_padding(true); }
35         program_node& input() const { return get_dependency(0); }
36     };
37
38     using one_hot_node = typed_program_node<one_hot>;
39
40
41     template <>
42     class typed_primitive_inst<one_hot> : public typed_primitive_inst_base<one_hot>
43     {
44         using parent = typed_primitive_inst_base<one_hot>;
45
46     public:
47         static layout calc_output_layout(one_hot_node const& node);
48         static std::string to_string(one_hot_node const& node);
49         typed_primitive_inst(network_impl& network, one_hot_node const& node);
50     };
51
52     using one_hot_inst = typed_primitive_inst<one_hot>;
53 }