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

engine_types.h
1 /* file: engine_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 engine.
19 //--
20 */
21 
22 #ifndef __ENGINE__TYPES__H__
23 #define __ENGINE__TYPES__H__
24 
25 #include "algorithms/algorithm.h"
26 #include "services/daal_defines.h"
27 #include "data_management/data/numeric_table.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
43 namespace engines
44 {
49 enum InputId
50 {
51  tableToFill = 0
52 };
53 
58 enum ResultId
59 {
60  randomNumbers = 0
61 };
62 
66 namespace interface1
67 {
72 class DAAL_EXPORT Input : public daal::algorithms::Input
73 {
74 public:
78  Input();
80  Input(const Input& other);
81 
82  virtual ~Input() {}
83 
89  data_management::NumericTablePtr get(InputId id) const;
90 
96  void set(InputId id, const data_management::NumericTablePtr &ptr);
97 
105  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
106 };
107 
112 class DAAL_EXPORT Result : public daal::algorithms::Result
113 {
114 public:
116  Result();
117 
118  virtual ~Result() {}
119 
128  template <typename algorithmFPType>
129  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
130 
136  data_management::NumericTablePtr get(ResultId id) const;
137 
143  void set(ResultId id, const data_management::NumericTablePtr &ptr);
144 
153  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
154 
155 protected:
157  template<typename Archive, bool onDeserialize>
158  services::Status serialImpl(Archive *arch)
159  {
160  daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
161 
162  return services::Status();
163  }
164 
165  services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE
166  {
167  serialImpl<data_management::InputDataArchive, false>(arch);
168 
169  return services::Status();
170  }
171 
172  services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE
173  {
174  serialImpl<const data_management::OutputDataArchive, true>(arch);
175 
176  return services::Status();
177  }
178 };
179 typedef services::SharedPtr<Result> ResultPtr;
180 } // interface1
181 using interface1::Input;
182 using interface1::Result;
183 using interface1::ResultPtr;
184 } // namespace engines
186 } // namespace algorithm
187 } // namespace daal
188 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::engines::interface1::Input
Input objects for engines
Definition: engine_types.h:72
daal_defines.h
daal::algorithms::engines::InputId
InputId
Definition: engine_types.h:49
daal::algorithms::engines::interface1::Result
Provides methods to access the result obtained with the compute() method of the engine.
Definition: engine_types.h:112
daal::algorithms::engines::tableToFill
Definition: engine_types.h:51
daal::algorithms::engines::randomNumbers
Definition: engine_types.h:60
daal::algorithms::engines::ResultId
ResultId
Definition: engine_types.h:58

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