C++ API Reference for Intel® Data Analytics Acceleration Library 2019

concat_layer_forward_types.h
1 /* file: concat_layer_forward_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the forward concat layer
19 //--
20 */
21 
22 #ifndef __CONCAT_LAYER_FORWARD_TYPES_H__
23 #define __CONCAT_LAYER_FORWARD_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/tensor.h"
27 #include "data_management/data/homogen_tensor.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "services/daal_defines.h"
30 #include "algorithms/neural_networks/layers/layer_forward_types.h"
31 #include "algorithms/neural_networks/layers/concat/concat_layer_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace neural_networks
38 {
39 namespace layers
40 {
44 namespace concat
45 {
55 namespace forward
56 {
60 namespace interface1
61 {
66 class DAAL_EXPORT Input : public layers::forward::Input
67 {
68 public:
69  typedef layers::forward::Input super;
71  Input();
72 
74  Input(const Input& other);
75 
79  using layers::forward::Input::get;
80 
84  using layers::forward::Input::set;
85 
86  virtual ~Input() {}
87 
94  data_management::TensorPtr get(layers::forward::InputLayerDataId id, size_t index) const;
95 
101  LayerDataPtr get(layers::forward::InputLayerDataId id) const;
102 
108  void set(layers::forward::InputLayerDataId id, const LayerDataPtr &value);
109 
116  void set(layers::forward::InputLayerDataId id, const data_management::TensorPtr &value, size_t index);
117 
125  virtual services::Status addData(const data_management::TensorPtr &dataTensor, size_t index) DAAL_C11_OVERRIDE;
126 
132  virtual services::Status eraseInputData() DAAL_C11_OVERRIDE;
133 
141  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
142 
147  LayerInputLayout getLayout() DAAL_C11_OVERRIDE;
148 };
149 
154 class DAAL_EXPORT Result : public layers::forward::Result
155 {
156 public:
157  DECLARE_SERIALIZABLE_CAST(Result);
159  Result();
160  virtual ~Result() {};
161 
165  using layers::forward::Result::get;
166 
170  using layers::forward::Result::set;
171 
177  void set(LayerDataId id, const data_management::NumericTablePtr &value);
178 
184  data_management::NumericTablePtr get(layers::concat::LayerDataId id) const;
185 
193  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
194  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
195 
203  services::Collection<size_t> getValueSize(const services::Collection< services::Collection<size_t> > &inputSize,
204  const daal::algorithms::Parameter *parameter, const int method) DAAL_C11_OVERRIDE;
213  template <typename algorithmFPType>
214  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
215 
224  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter,
225  int method) const DAAL_C11_OVERRIDE;
226 
227 protected:
229  template<typename Archive, bool onDeserialize>
230  services::Status serialImpl(Archive *arch)
231  {
232  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
233  }
234 };
235 typedef services::SharedPtr<Result> ResultPtr;
236 
237 } // namespace interface1
238 using interface1::Input;
239 using interface1::Result;
240 using interface1::ResultPtr;
241 } // namespace forward
243 } // namespace concat
244 } // namespace layers
245 } // namespace neural_networks
246 } // namespace algorithm
247 } // namespace daal
248 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::concat::forward::interface1::Input
Input objects for the forward concat layer
Definition: concat_layer_forward_types.h:66
daal_defines.h
daal::algorithms::neural_networks::layers::LayerInputLayout
LayerInputLayout
Definition: layer_types.h:57
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::forward::InputLayerDataId
InputLayerDataId
Definition: layer_forward_types.h:73
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:154
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:64

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