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

layer_forward_descriptor.h
1 /* file: layer_forward_descriptor.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 neural network forward layer descriptor.
45 //--
46 */
47 
48 #ifndef __LAYER_FORWARD_DESCRIPTOR_H__
49 #define __LAYER_FORWARD_DESCRIPTOR_H__
50 
51 #include "algorithms/neural_networks/layers/layer_forward.h"
52 
53 namespace daal
54 {
55 namespace algorithms
56 {
60 namespace neural_networks
61 {
65 namespace layers
66 {
70 namespace forward
71 {
72 namespace interface1
73 {
83 class LayerDescriptor
84 {
85 public:
86  DAAL_NEW_DELETE();
87 
89  LayerDescriptor(): _index(0) {}
90 
98  LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_, const NextLayers &nextLayers_) :
99  _index(index_), _layer(layer_), _nextLayers(nextLayers_) {}
100 
106  LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_) : _index(index_), _layer(layer_) {}
107 
109  LayerDescriptor(const LayerDescriptor& other): _index(other._index), _layer(other._layer), _nextLayers(other._nextLayers) {}
110 
115  size_t index() const { return _index; }
116 
123  services::Status addNext(size_t index)
124  {
125  _nextLayers.add(index);
126  return services::Status();
127  }
128 
133  const forward::LayerIfacePtr & layer() const { return _layer; }
134 
139  const NextLayers & nextLayers() const { return _nextLayers; }
140 
141 private:
142  forward::LayerIfacePtr _layer;
143  NextLayers _nextLayers;
144  size_t _index;
145 };
147 } // namespace interface1
148 using interface1::LayerDescriptor;
149 } // namespace forward
150 } // namespace layers
151 } // namespace neural_networks
152 } // namespace algorithms
153 } // namespace daal
154 #endif
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::layer
const forward::LayerIfacePtr & layer() const
Definition: layer_forward_descriptor.h:133
daal::algorithms::neural_networks::layers::interface1::NextLayers
Contains list of layer indices of layers following the current layer.
Definition: layer_types.h:140
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const LayerDescriptor &other)
Definition: layer_forward_descriptor.h:109
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::index
size_t index() const
Definition: layer_forward_descriptor.h:115
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::addNext
services::Status addNext(size_t index)
Definition: layer_forward_descriptor.h:123
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_)
Definition: layer_forward_descriptor.h:106
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::nextLayers
const NextLayers & nextLayers() const
Definition: layer_forward_descriptor.h:139
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor
Class defining descriptor for layer on forward stage.
Definition: layer_forward_descriptor.h:83
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor()
Definition: layer_forward_descriptor.h:89
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_, const NextLayers &nextLayers_)
Definition: layer_forward_descriptor.h:98
daal::algorithms::neural_networks::layers::interface1::NextLayers::add
void add(size_t index)
Definition: layer_types.h:282

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