2 // Copyright (c) 2019 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
20 #include "../C/depth_to_space.h"
21 #include "primitive.hpp"
25 /// @addtogroup cpp_api C++ API
27 /// @addtogroup cpp_topology Network Topology
29 /// @addtogroup cpp_primitives Primitives
34 struct depth_to_space : public primitive_base<depth_to_space, CLDNN_PRIMITIVE_DESC(depth_to_space)>
36 CLDNN_DECLARE_PRIMITIVE(depth_to_space)
38 /// @brief Constructs depth_to_space primitive.
39 /// @param id This primitive id.
40 /// @param input Input dictionary primitive id.
41 /// @param block_size Block size.
43 const primitive_id& id,
44 const primitive_id& input,
45 const size_t block_size,
46 const padding& output_padding = padding()
48 : primitive_base(id, {input}, output_padding)
49 , block_size(block_size)
53 /// @brief Constructs a copy from C API @CLDNN_PRIMITIVE_DESC{depth_to_space}
54 depth_to_space(const dto* dto)
56 , block_size(dto->block_size)
60 /// @brief Block size.
64 void update_dto(dto& dto) const override
66 dto.block_size = block_size;