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

smoothrelu_types.h
1 /* file: smoothrelu_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 SmoothReLU algorithm interface.
19 //--
20 */
21 
22 #ifndef __SMOOTHRELU_TYPES_H__
23 #define __SMOOTHRELU_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/homogen_numeric_table.h"
28 #include "services/daal_defines.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
37 namespace math
38 {
48 namespace smoothrelu
49 {
54 enum Method
55 {
56  defaultDense = 0
57 };
58 
63 enum InputId
64 {
65  data,
66  lastInputId = data
67 };
68 
73 enum ResultId
74 {
75  value,
76  lastResultId = value
77 };
78 
82 namespace interface1
83 {
88 class DAAL_EXPORT Input : public daal::algorithms::Input
89 {
90 public:
91  Input();
92 
94  Input(const Input& other) : daal::algorithms::Input(other){}
95 
96  virtual ~Input() {}
97 
103  data_management::NumericTablePtr get(InputId id) const;
104 
110  void set(InputId id, const data_management::NumericTablePtr &ptr);
111 
119  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
120 };
121 
126 class DAAL_EXPORT Result : public daal::algorithms::Result
127 {
128 public:
129  DECLARE_SERIALIZABLE_CAST(Result);
130  Result();
131 
132  virtual ~Result() {};
133 
142  template <typename algorithmFPType>
143  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
144 
150  data_management::NumericTablePtr get(ResultId id) const;
151 
157  void set(ResultId id, const data_management::NumericTablePtr &ptr);
158 
167  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
168 
169 protected:
171  template<typename Archive, bool onDeserialize>
172  services::Status serialImpl(Archive *arch)
173  {
174  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
175  }
176 };
177 typedef services::SharedPtr<Result> ResultPtr;
178 
180 } // namespace interface1
181 using interface1::Input;
182 using interface1::Result;
183 using interface1::ResultPtr;
184 
185 } // namespace smoothrelu
186 } // namespace math
187 } // namespace algorithm
188 } // namespace daal
189 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::math::smoothrelu::interface1::Result
Results obtained with the compute() method of the SmoothReLU algorithm in the batch processing mode...
Definition: smoothrelu_types.h:126
daal::algorithms::math::smoothrelu::interface1::Input::Input
Input(const Input &other)
Definition: smoothrelu_types.h:94
daal::algorithms::math::smoothrelu::InputId
InputId
Definition: smoothrelu_types.h:63
daal::algorithms::math::smoothrelu::value
Definition: smoothrelu_types.h:75
daal_defines.h
daal::algorithms::math::smoothrelu::defaultDense
Definition: smoothrelu_types.h:56
daal::algorithms::math::smoothrelu::ResultId
ResultId
Definition: smoothrelu_types.h:73
daal::algorithms::math::smoothrelu::data
Definition: smoothrelu_types.h:65
daal::algorithms::math::smoothrelu::Method
Method
Definition: smoothrelu_types.h:54
daal::algorithms::math::smoothrelu::interface1::Input
Input parameters for the SmoothReLU algorithm
Definition: smoothrelu_types.h:88

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