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

sorting_types.h
1 /* file: sorting_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 // Definition of common types of sorting.
21 //--
22 */
23 
24 #ifndef __SORTING_TYPES_H__
25 #define __SORTING_TYPES_H__
26 
27 #include "data_management/data/homogen_numeric_table.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
42 namespace sorting
43 {
48 enum Method
49 {
50  defaultDense = 0
51 };
52 
57 enum InputId
58 {
59  data,
60  lastInputId = data
61 };
62 
67 enum ResultId
68 {
69  sortedData,
70  lastResultId = sortedData
71 };
72 
76 namespace interface1
77 {
82 class DAAL_EXPORT Input : public daal::algorithms::Input
83 {
84 public:
85  Input();
86  Input(const Input& other);
87 
88  virtual ~Input() {}
89 
95  data_management::NumericTablePtr get(InputId id) const;
96 
102  void set(InputId id, const data_management::NumericTablePtr &ptr);
103 
109  virtual services::Status check(const Parameter *par, int method) const DAAL_C11_OVERRIDE;
110 };
111 
117 class DAAL_EXPORT Result : public daal::algorithms::Result
118 {
119 public:
120  DECLARE_SERIALIZABLE_CAST(Result);
121  Result();
122 
123  virtual ~Result() {};
124 
130  template <typename algorithmFPType>
131  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const int method);
132 
138  data_management::NumericTablePtr get(ResultId id) const;
139 
145  void set(ResultId id, const data_management::NumericTablePtr &value);
146 
153  virtual services::Status check(const daal::algorithms::Input *in, const Parameter *par, int method) const DAAL_C11_OVERRIDE;
154 
155 protected:
157  template<typename Archive, bool onDeserialize>
158  services::Status serialImpl(Archive *arch)
159  {
160  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
161  }
162 };
163 typedef services::SharedPtr<Result> ResultPtr;
164 
166 } // namespace interface1
167 using interface1::Input;
168 using interface1::Result;
169 using interface1::ResultPtr;
170 
171 } // namespace daal::algorithms::sorting
172 } // namespace daal::algorithms
173 } // namespace daal
174 #endif
daal::algorithms::sorting::defaultDense
Definition: sorting_types.h:50
daal::algorithms::sorting::Method
Method
Definition: sorting_types.h:48
daal::algorithms::sorting::interface1::Input
Input objects for the sorting algorithm
Definition: sorting_types.h:82
daal::algorithms::sorting::sortedData
Definition: sorting_types.h:69
daal::algorithms::sorting::interface1::Result
Provides methods to access final results obtained with the compute() method of the sorting algorithm ...
Definition: sorting_types.h:117
daal::algorithms::sorting::data
Definition: sorting_types.h:59
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::sorting::ResultId
ResultId
Definition: sorting_types.h:67
daal::algorithms::sorting::InputId
InputId
Definition: sorting_types.h:57

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