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

abs_types.h
1 /* file: abs_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 absolute value function interface.
19 //--
20 */
21 
22 #ifndef __ABS_TYPES_H__
23 #define __ABS_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 {
55 namespace abs
56 {
62 enum Method
63 {
64  defaultDense = 0,
65  fastCSR = 1
66 };
67 
73 enum InputId
74 {
75  data,
76  lastInputId = data
77 };
78 
84 enum ResultId
85 {
86  value,
87  lastResultId = value
88 };
89 
93 namespace interface1
94 {
99 class DAAL_EXPORT Input : public daal::algorithms::Input
100 {
101 public:
103  Input();
104 
106  Input(const Input& other) : daal::algorithms::Input(other){}
107 
108  virtual ~Input() {}
109 
115  data_management::NumericTablePtr get(InputId id) const;
116 
122  void set(InputId id, const data_management::NumericTablePtr &ptr);
123 
131  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
132 };
133 
138 class DAAL_EXPORT Result : public daal::algorithms::Result
139 {
140 public:
141  DECLARE_SERIALIZABLE_CAST(Result);
143  Result();
144 
145  virtual ~Result() {};
146 
155  template <typename algorithmFPType>
156  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
157 
163  data_management::NumericTablePtr get(ResultId id) const;
164 
170  void set(ResultId id, const data_management::NumericTablePtr &ptr);
171 
180  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
181 
182 protected:
184  template<typename Archive, bool onDeserialize>
185  services::Status serialImpl(Archive *arch)
186  {
187  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
188  }
189 };
190 typedef services::SharedPtr<Result> ResultPtr;
193 } // namespace interface1
194 using interface1::Input;
195 using interface1::Result;
196 using interface1::ResultPtr;
197 
198 } // namespace abs
199 } // namespace math
200 } // namespace algorithm
201 } // namespace daal
202 #endif
daal::algorithms::math::abs::data
Definition: abs_types.h:75
daal::algorithms::math::abs::ResultId
ResultId
Definition: abs_types.h:84
daal
Definition: algorithm_base_common.h:31
daal::algorithms::math::abs::interface1::Input
Input objects for the absolute value function
Definition: abs_types.h:99
daal_defines.h
daal::algorithms::math::abs::Method
Method
Definition: abs_types.h:62
daal::algorithms::math::abs::interface1::Input::Input
Input(const Input &other)
Definition: abs_types.h:106
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:138
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::math::abs::defaultDense
Definition: abs_types.h:64
daal::algorithms::math::abs::fastCSR
Definition: abs_types.h:65
daal::algorithms::math::abs::InputId
InputId
Definition: abs_types.h:73

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