C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 1

concat_layer_forward_types.h
1 /* file: concat_layer_forward_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Implementation of the forward concat layer
45 //--
46 */
47 
48 #ifndef __CONCAT_LAYER_FORWARD_TYPES_H__
49 #define __CONCAT_LAYER_FORWARD_TYPES_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/tensor.h"
53 #include "data_management/data/homogen_tensor.h"
54 #include "data_management/data/homogen_numeric_table.h"
55 #include "services/daal_defines.h"
56 #include "algorithms/neural_networks/layers/layer_forward_types.h"
57 #include "algorithms/neural_networks/layers/concat/concat_layer_types.h"
58 
59 namespace daal
60 {
61 namespace algorithms
62 {
63 namespace neural_networks
64 {
65 namespace layers
66 {
70 namespace concat
71 {
81 namespace forward
82 {
86 namespace interface1
87 {
92 class DAAL_EXPORT Input : public layers::forward::Input
93 {
94 public:
95  typedef layers::forward::Input super;
97  Input();
98 
100  Input(const Input& other);
101 
105  using layers::forward::Input::get;
106 
110  using layers::forward::Input::set;
111 
112  virtual ~Input() {}
113 
120  data_management::TensorPtr get(layers::forward::InputLayerDataId id, size_t index) const;
121 
127  LayerDataPtr get(layers::forward::InputLayerDataId id) const;
128 
134  void set(layers::forward::InputLayerDataId id, const LayerDataPtr &value);
135 
142  void set(layers::forward::InputLayerDataId id, const data_management::TensorPtr &value, size_t index);
143 
151  virtual services::Status addData(const data_management::TensorPtr &dataTensor, size_t index) DAAL_C11_OVERRIDE;
152 
158  virtual services::Status eraseInputData() DAAL_C11_OVERRIDE;
159 
167  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
168 
173  LayerInputLayout getLayout() DAAL_C11_OVERRIDE;
174 };
175 
180 class DAAL_EXPORT Result : public layers::forward::Result
181 {
182 public:
183  DECLARE_SERIALIZABLE_CAST(Result);
185  Result();
186  virtual ~Result() {};
187 
191  using layers::forward::Result::get;
192 
196  using layers::forward::Result::set;
197 
203  void set(LayerDataId id, const data_management::NumericTablePtr &value);
204 
210  data_management::NumericTablePtr get(layers::concat::LayerDataId id) const;
211 
219  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
220  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
221 
229  services::Collection<size_t> getValueSize(const services::Collection< services::Collection<size_t> > &inputSize,
230  const daal::algorithms::Parameter *parameter, const int method) DAAL_C11_OVERRIDE;
239  template <typename algorithmFPType>
240  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
241 
250  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter,
251  int method) const DAAL_C11_OVERRIDE;
252 
253 protected:
255  template<typename Archive, bool onDeserialize>
256  services::Status serialImpl(Archive *arch)
257  {
258  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
259  }
260 };
261 typedef services::SharedPtr<Result> ResultPtr;
262 
263 } // namespace interface1
264 using interface1::Input;
265 using interface1::Result;
266 using interface1::ResultPtr;
267 } // namespace forward
269 } // namespace concat
270 } // namespace layers
271 } // namespace neural_networks
272 } // namespace algorithm
273 } // namespace daal
274 #endif
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::layers::concat::forward::interface1::Input
Input objects for the forward concat layer
Definition: concat_layer_forward_types.h:92
daal_defines.h
daal::algorithms::neural_networks::layers::LayerInputLayout
LayerInputLayout
Definition: layer_types.h:83
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::neural_networks::layers::forward::InputLayerDataId
InputLayerDataId
Definition: layer_forward_types.h:99
daal::algorithms::neural_networks::layers::concat::forward::interface1::Result
Provides methods to access the result obtained with the compute() method of the forward concat layer...
Definition: concat_layer_forward_types.h:180
daal::algorithms::neural_networks::layers::concat::LayerDataId
LayerDataId
Identifiers of input objects for the backward concat layer and results for the forward concat layer...
Definition: concat_layer_types.h:90

For more complete information about compiler optimizations, see our Optimization Notice.