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

tanh_types.h
1 /* file: tanh_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 the hyperbolic tangent function interface.
19 //--
20 */
21 
22 #ifndef __TANH_TYPES_H__
23 #define __TANH_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/csr_numeric_table.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "services/daal_defines.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
44 namespace math
45 {
49 namespace tanh
50 {
55 enum Method
56 {
57  defaultDense = 0,
58  fastCSR = 1
59 };
60 
65 enum InputId
66 {
67  data,
68  lastInputId = data
69 };
70 
75 enum ResultId
76 {
77  value,
78  lastResultId = value
79 };
80 
84 namespace interface1
85 {
90 class DAAL_EXPORT Input : public daal::algorithms::Input
91 {
92 public:
94  Input();
95 
97  Input(const Input& other) : daal::algorithms::Input(other){}
98 
99  virtual ~Input() {}
100 
106  data_management::NumericTablePtr get(InputId id) const;
107 
113  void set(InputId id, const data_management::NumericTablePtr &ptr);
114 
122  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
123 };
124 
129 class DAAL_EXPORT Result : public daal::algorithms::Result
130 {
131 public:
132  DECLARE_SERIALIZABLE_CAST(Result);
134  Result();
135 
136  virtual ~Result() {};
137 
146  template <typename algorithmFPType>
147  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
148 
154  data_management::NumericTablePtr get(ResultId id) const;
155 
161  void set(ResultId id, const data_management::NumericTablePtr &ptr);
162 
171  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
172 
173 protected:
175  template<typename Archive, bool onDeserialize>
176  services::Status serialImpl(Archive *arch)
177  {
178  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
179  }
180 };
181 typedef services::SharedPtr<Result> ResultPtr;
182 
184 } // namespace interface1
185 using interface1::Input;
186 using interface1::Result;
187 using interface1::ResultPtr;
188 
189 } // namespace tanh
190 } // namespace math
191 } // namespace algorithm
192 } // namespace daal
193 #endif
daal::algorithms::math::tanh::interface1::Input
Input objects for the hyperbolic tangent function
Definition: tanh_types.h:90
daal
Definition: algorithm_base_common.h:31
daal::algorithms::math::tanh::ResultId
ResultId
Definition: tanh_types.h:75
daal::algorithms::math::tanh::interface1::Input::Input
Input(const Input &other)
Definition: tanh_types.h:97
daal_defines.h
daal::algorithms::math::tanh::Method
Method
Definition: tanh_types.h:55
daal::algorithms::math::tanh::fastCSR
Definition: tanh_types.h:58
daal::algorithms::math::tanh::interface1::Result
Result obtained with the compute() method of the hyperbolic tangent function in the batch processing ...
Definition: tanh_types.h:129
daal::algorithms::math::tanh::data
Definition: tanh_types.h:67
daal::algorithms::math::tanh::defaultDense
Definition: tanh_types.h:57
daal::algorithms::math::tanh::InputId
InputId
Definition: tanh_types.h:65
daal::algorithms::math::tanh::value
Definition: tanh_types.h:77

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