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

tanh_types.h
1 /* file: tanh_types.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 the hyperbolic tangent function interface.
21 //--
22 */
23 
24 #ifndef __TANH_TYPES_H__
25 #define __TANH_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "data_management/data/csr_numeric_table.h"
30 #include "data_management/data/homogen_numeric_table.h"
31 #include "services/daal_defines.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
46 namespace math
47 {
51 namespace tanh
52 {
57 enum Method
58 {
59  defaultDense = 0,
60  fastCSR = 1
61 };
62 
67 enum InputId
68 {
69  data,
70  lastInputId = data
71 };
72 
77 enum ResultId
78 {
79  value,
80  lastResultId = value
81 };
82 
86 namespace interface1
87 {
93 class DAAL_EXPORT Input : public daal::algorithms::Input
94 {
95 public:
100  Input();
101 
106  Input(const Input& other) : daal::algorithms::Input(other){}
107 
108  /*
109  * \DAAL_DEPRECATED
110  */
111  DAAL_DEPRECATED_VIRTUAL virtual ~Input() {}
112 
118  data_management::NumericTablePtr get(InputId id) const;
119 
125  void set(InputId id, const data_management::NumericTablePtr &ptr);
126 
134  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
135 };
136 
142 class DAAL_EXPORT Result : public daal::algorithms::Result
143 {
144 public:
145  DECLARE_SERIALIZABLE_CAST(Result);
150  Result();
151 
152  /*
153  * \DAAL_DEPRECATED
154  */
155  DAAL_DEPRECATED_VIRTUAL virtual ~Result() {};
156 
165  template <typename algorithmFPType>
166  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
167 
173  data_management::NumericTablePtr get(ResultId id) const;
174 
180  void set(ResultId id, const data_management::NumericTablePtr &ptr);
181 
190  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
191 
192 protected:
194  template<typename Archive, bool onDeserialize>
195  services::Status serialImpl(Archive *arch)
196  {
197  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
198  }
199 };
200 typedef services::SharedPtr<Result> ResultPtr;
201 
203 } // namespace interface1
204 using interface1::Input;
205 using interface1::Result;
206 using interface1::ResultPtr;
207 
208 } // namespace tanh
209 } // namespace math
210 } // namespace algorithm
211 } // namespace daal
212 #endif
daal::algorithms::math::tanh::ResultId
ResultId
Definition: tanh_types.h:77
daal::algorithms::math::tanh::interface1::Input::Input
Input(const Input &other)
Definition: tanh_types.h:106
daal::algorithms::math::tanh::fastCSR
Definition: tanh_types.h:60
daal::algorithms::math::tanh::data
Definition: tanh_types.h:69
daal_defines.h
daal::algorithms::math::tanh::InputId
InputId
Definition: tanh_types.h:67
daal::algorithms::math::tanh::defaultDense
Definition: tanh_types.h:59
daal::algorithms::math::tanh::interface1::Input
Input objects for the hyperbolic tangent function
Definition: tanh_types.h:93
daal::algorithms::math::tanh::value
Definition: tanh_types.h:79
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:142
daal::algorithms::math::tanh::Method
Method
Definition: tanh_types.h:57

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