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

distribution_types.h
1 /* file: distribution_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 distributions.
19 //--
20 */
21 
22 #ifndef __DISTRIBUTIONS__TYPES__H__
23 #define __DISTRIBUTIONS__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 #include "algorithms/engines/engine.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
44 namespace distributions
45 {
50 enum InputId
51 {
52  tableToFill = 0
53 };
54 
59 enum ResultId
60 {
61  randomNumbers = 0
62 };
63 
67 namespace interface1
68 {
73 class DAAL_EXPORT ParameterBase: public daal::algorithms::Parameter
74 {
75 public:
76  ParameterBase();
77  virtual ~ParameterBase();
78 
79  engines::EnginePtr engine;
80 };
81 
86 class DAAL_EXPORT Input : public daal::algorithms::Input
87 {
88 public:
92  Input();
94  Input(const Input& other);
95 
96  virtual ~Input();
97 
103  data_management::NumericTablePtr get(InputId id) const;
104 
110  void set(InputId id, const data_management::NumericTablePtr &ptr);
111 
119  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
120 };
121 
126 class DAAL_EXPORT Result : public daal::algorithms::Result
127 {
128 public:
130  Result();
131 
132  virtual ~Result();
133 
142  template <typename algorithmFPType>
143  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
144 
150  data_management::NumericTablePtr get(ResultId id) const;
151 
157  void set(ResultId id, const data_management::NumericTablePtr &ptr);
158 
167  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
168 
169 protected:
171  template<typename Archive, bool onDeserialize>
172  services::Status serialImpl(Archive *arch)
173  {
174  daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
175 
176  return services::Status();
177  }
178 
179  services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE
180  {
181  serialImpl<data_management::InputDataArchive, false>(arch);
182 
183  return services::Status();
184  }
185 
186  services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE
187  {
188  serialImpl<const data_management::OutputDataArchive, true>(arch);
189 
190  return services::Status();
191  }
192 };
193 typedef services::SharedPtr<Result> ResultPtr;
194 } // interface1
195 using interface1::Input;
196 using interface1::Result;
197 using interface1::ResultPtr;
198 using interface1::ParameterBase;
200 } // namespace distributions
201 } // namespace algorithm
202 } // namespace daal
203 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::distributions::interface1::ParameterBase::engine
engines::EnginePtr engine
Definition: distribution_types.h:79
daal::algorithms::distributions::interface1::ParameterBase
Definition: distribution_types.h:73
daal::algorithms::distributions::randomNumbers
Definition: distribution_types.h:61
daal_defines.h
daal::algorithms::distributions::interface1::Result
Provides methods to access the result obtained with the compute() method of the distribution.
Definition: distribution_types.h:126
daal::algorithms::distributions::interface1::Input
Input objects for distributions
Definition: distribution_types.h:86
daal::algorithms::distributions::ResultId
ResultId
Definition: distribution_types.h:59
daal::algorithms::distributions::tableToFill
Definition: distribution_types.h:52
daal::algorithms::distributions::InputId
InputId
Definition: distribution_types.h:50

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