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

abs_types.h
1 /* file: abs_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 absolute value function interface.
21 //--
22 */
23 
24 #ifndef __ABS_TYPES_H__
25 #define __ABS_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 {
57 namespace abs
58 {
64 enum Method
65 {
66  defaultDense = 0,
67  fastCSR = 1
68 };
69 
75 enum InputId
76 {
77  data,
78  lastInputId = data
79 };
80 
86 enum ResultId
87 {
88  value,
89  lastResultId = value
90 };
91 
95 namespace interface1
96 {
102 class DAAL_EXPORT Input : public daal::algorithms::Input
103 {
104 public:
109  Input();
110 
115  Input(const Input& other) : daal::algorithms::Input(other){}
116 
117  /*
118  * \DAAL_DEPRECATED
119  */
120  DAAL_DEPRECATED_VIRTUAL virtual ~Input() {}
121 
127  data_management::NumericTablePtr get(InputId id) const;
128 
134  void set(InputId id, const data_management::NumericTablePtr &ptr);
135 
143  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
144 };
145 
151 class DAAL_EXPORT Result : public daal::algorithms::Result
152 {
153 public:
154  DECLARE_SERIALIZABLE_CAST(Result);
159  Result();
160 
161  /*
162  * \DAAL_DEPRECATED
163  */
164  DAAL_DEPRECATED_VIRTUAL virtual ~Result() {};
165 
174  template <typename algorithmFPType>
175  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
176 
182  data_management::NumericTablePtr get(ResultId id) const;
183 
189  void set(ResultId id, const data_management::NumericTablePtr &ptr);
190 
199  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
200 
201 protected:
203  template<typename Archive, bool onDeserialize>
204  services::Status serialImpl(Archive *arch)
205  {
206  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
207  }
208 };
209 typedef services::SharedPtr<Result> ResultPtr;
212 } // namespace interface1
213 using interface1::Input;
214 using interface1::Result;
215 using interface1::ResultPtr;
216 
217 } // namespace abs
218 } // namespace math
219 } // namespace algorithm
220 } // namespace daal
221 #endif
daal::algorithms::math::abs::fastCSR
Definition: abs_types.h:67
daal::algorithms::math::abs::InputId
InputId
Definition: abs_types.h:75
daal::algorithms::math::abs::interface1::Input::Input
Input(const Input &other)
Definition: abs_types.h:115
daal_defines.h
daal::algorithms::math::abs::data
Definition: abs_types.h:77
daal::algorithms::math::abs::interface1::Result
Result obtained with the compute() method of the absolute value function in the batch processing mode...
Definition: abs_types.h:151
daal::algorithms::math::abs::Method
Method
Definition: abs_types.h:64
daal::algorithms::math::abs::defaultDense
Definition: abs_types.h:66
daal::algorithms::math::abs::ResultId
ResultId
Definition: abs_types.h:86
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::math::abs::interface1::Input
Input objects for the absolute value function
Definition: abs_types.h:102

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