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

layer_forward_descriptor.h
1 /* file: layer_forward_descriptor.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of neural network forward layer descriptor.
21 //--
22 */
23 
24 #ifndef __LAYER_FORWARD_DESCRIPTOR_H__
25 #define __LAYER_FORWARD_DESCRIPTOR_H__
26 
27 #include "algorithms/neural_networks/layers/layer_forward.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
36 namespace neural_networks
37 {
41 namespace layers
42 {
46 namespace forward
47 {
48 namespace interface1
49 {
60 class LayerDescriptor
61 {
62 public:
63  DAAL_NEW_DELETE();
64 
69  LayerDescriptor(): _index(0) {}
70 
79  LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_, const NextLayers &nextLayers_) :
80  _index(index_), _layer(layer_), _nextLayers(nextLayers_) {}
81 
88  LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_) : _index(index_), _layer(layer_) {}
89 
94  DAAL_DEPRECATED LayerDescriptor(const LayerDescriptor& other): _index(other._index), _layer(other._layer), _nextLayers(other._nextLayers) {}
95 
101  size_t index() const { return _index; }
102 
110  services::Status addNext(size_t index)
111  {
112  _nextLayers.add(index);
113  return services::Status();
114  }
115 
121  const forward::LayerIfacePtr & layer() const { return _layer; }
122 
128  const NextLayers & nextLayers() const { return _nextLayers; }
129 
130 private:
131  forward::LayerIfacePtr _layer;
132  NextLayers _nextLayers;
133  size_t _index;
134 };
136 } // namespace interface1
137 using interface1::LayerDescriptor;
138 } // namespace forward
139 } // namespace layers
140 } // namespace neural_networks
141 } // namespace algorithms
142 } // namespace daal
143 #endif
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor
Class defining descriptor for layer on forward stage.
Definition: layer_forward_descriptor.h:60
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::nextLayers
const NextLayers & nextLayers() const
Definition: layer_forward_descriptor.h:128
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::addNext
services::Status addNext(size_t index)
Definition: layer_forward_descriptor.h:110
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::layer
const forward::LayerIfacePtr & layer() const
Definition: layer_forward_descriptor.h:121
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::index
size_t index() const
Definition: layer_forward_descriptor.h:101
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:79
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
DAAL_DEPRECATED LayerDescriptor(const LayerDescriptor &other)
Definition: layer_forward_descriptor.h:94
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const forward::LayerIfacePtr &layer_)
Definition: layer_forward_descriptor.h:88
daal::algorithms::neural_networks::layers::forward::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor()
Definition: layer_forward_descriptor.h:69
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor
Class defining descriptor for layer on both forward and backward stages and its parameters.
Definition: layer_descriptor.h:48

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