clDNN
input_layout.hpp
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
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
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 */
16 
18 #pragma once
19 #include "../C/input_layout.h"
20 #include "primitive.hpp"
21 #include "memory.hpp"
22 
23 namespace cldnn
24 {
31 
39 struct input_layout : public primitive_base<input_layout, CLDNN_PRIMITIVE_DESC(input_layout)>
40 {
41  CLDNN_DECLATE_PRIMITIVE(input_layout)
42 
43 
44  input_layout(const primitive_id& id, const layout& layout)
48  , layout(layout)
49  {}
50 
52  explicit input_layout(const dto* dto)
54  , layout(dto->layout)
55  {
57  }
58 
61 
62 private:
63  void update_dto(dto& dto) const override
64  {
65  dto.layout = layout;
66  }
67 };
71 }
cldnn_layout layout
Defines layout for the data will be passed to network.
Definition: input_layout.h:41
input_layout(const dto *dto)
Constructs a copy from C API cldnn_input_layout_desc.
const cldnn::layout layout
Defines layout for the data will be passed to network.
input_layout(const primitive_id &id, const layout &layout)
Constructs input layout primitive.
Provides input layout for a data to be passed later to network.
padding data_padding
Explicit padding of the memory.
Definition: layout.hpp:382
std::string primitive_id
Unique id of a primitive within a topology.
Definition: primitive.hpp:42
Provides input layout for a data to be passed later to network.
Definition: input_layout.h:39
base class for all primitives implementations.
Definition: primitive.hpp:190
padding output_padding
Requested output padding.
Definition: primitive.hpp:149
Describes memory layout.
Definition: layout.hpp:223