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

engine_types.h
1 /* file: engine_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 engine.
21 //--
22 */
23 
24 #ifndef __ENGINE__TYPES__H__
25 #define __ENGINE__TYPES__H__
26 
27 #include "algorithms/algorithm.h"
28 #include "services/daal_defines.h"
29 #include "data_management/data/numeric_table.h"
30 #include "data_management/data/homogen_numeric_table.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
45 namespace engines
46 {
51 enum InputId
52 {
53  tableToFill = 0
54 };
55 
60 enum ResultId
61 {
62  randomNumbers = 0
63 };
64 
68 namespace interface1
69 {
74 class DAAL_EXPORT Input : public daal::algorithms::Input
75 {
76 public:
80  Input();
82  Input(const Input& other);
83 
84  virtual ~Input() {}
85 
91  data_management::NumericTablePtr get(InputId id) const;
92 
98  void set(InputId id, const data_management::NumericTablePtr &ptr);
99 
107  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
108 };
109 
114 class DAAL_EXPORT Result : public daal::algorithms::Result
115 {
116 public:
118  Result();
119 
120  virtual ~Result() {}
121 
130  template <typename algorithmFPType>
131  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
132 
138  data_management::NumericTablePtr get(ResultId id) const;
139 
145  void set(ResultId id, const data_management::NumericTablePtr &ptr);
146 
155  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
156 
157 protected:
159  template<typename Archive, bool onDeserialize>
160  services::Status serialImpl(Archive *arch)
161  {
162  daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
163 
164  return services::Status();
165  }
166 
167  services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE
168  {
169  serialImpl<data_management::InputDataArchive, false>(arch);
170 
171  return services::Status();
172  }
173 
174  services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE
175  {
176  serialImpl<const data_management::OutputDataArchive, true>(arch);
177 
178  return services::Status();
179  }
180 };
181 typedef services::SharedPtr<Result> ResultPtr;
182 } // interface1
183 using interface1::Input;
184 using interface1::Result;
185 using interface1::ResultPtr;
186 } // namespace engines
188 } // namespace algorithm
189 } // namespace daal
190 #endif
daal::algorithms::engines::interface1::Result
Provides methods to access the result obtained with the compute() method of the engine.
Definition: engine_types.h:114
daal::algorithms::engines::ResultId
ResultId
Definition: engine_types.h:60
daal_defines.h
daal::algorithms::engines::randomNumbers
Definition: engine_types.h:62
daal::algorithms::engines::tableToFill
Definition: engine_types.h:53
daal::algorithms::engines::InputId
InputId
Definition: engine_types.h:51
daal::algorithms::engines::interface1::Input
Input objects for engines
Definition: engine_types.h:74

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