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

distribution_types.h
1 /* file: distribution_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 distributions.
21 //--
22 */
23 
24 #ifndef __DISTRIBUTIONS__TYPES__H__
25 #define __DISTRIBUTIONS__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 #include "algorithms/engines/engine.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
46 namespace distributions
47 {
52 enum InputId
53 {
54  tableToFill = 0
55 };
56 
61 enum ResultId
62 {
63  randomNumbers = 0
64 };
65 
69 namespace interface1
70 {
75 class DAAL_EXPORT ParameterBase: public daal::algorithms::Parameter
76 {
77 public:
78  ParameterBase();
79  virtual ~ParameterBase();
80 
81  engines::EnginePtr engine;
82 };
83 
88 class DAAL_EXPORT Input : public daal::algorithms::Input
89 {
90 public:
94  Input();
96  Input(const Input& other);
97 
98  virtual ~Input();
99 
105  data_management::NumericTablePtr get(InputId id) const;
106 
112  void set(InputId id, const data_management::NumericTablePtr &ptr);
113 
121  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
122 };
123 
128 class DAAL_EXPORT Result : public daal::algorithms::Result
129 {
130 public:
132  Result();
133 
134  virtual ~Result();
135 
144  template <typename algorithmFPType>
145  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
146 
152  data_management::NumericTablePtr get(ResultId id) const;
153 
159  void set(ResultId id, const data_management::NumericTablePtr &ptr);
160 
169  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
170 
171 protected:
173  template<typename Archive, bool onDeserialize>
174  services::Status serialImpl(Archive *arch)
175  {
176  daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
177 
178  return services::Status();
179  }
180 
181  services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE
182  {
183  serialImpl<data_management::InputDataArchive, false>(arch);
184 
185  return services::Status();
186  }
187 
188  services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE
189  {
190  serialImpl<const data_management::OutputDataArchive, true>(arch);
191 
192  return services::Status();
193  }
194 };
195 typedef services::SharedPtr<Result> ResultPtr;
196 } // interface1
197 using interface1::Input;
198 using interface1::Result;
199 using interface1::ResultPtr;
200 using interface1::ParameterBase;
202 } // namespace distributions
203 } // namespace algorithm
204 } // namespace daal
205 #endif
daal::algorithms::distributions::interface1::Result
Provides methods to access the result obtained with the compute() method of the distribution.
Definition: distribution_types.h:128
daal::algorithms::distributions::interface1::ParameterBase
Definition: distribution_types.h:75
daal_defines.h
daal::algorithms::distributions::ResultId
ResultId
Definition: distribution_types.h:61
daal::algorithms::distributions::InputId
InputId
Definition: distribution_types.h:52
daal::algorithms::distributions::randomNumbers
Definition: distribution_types.h:63
daal::algorithms::distributions::tableToFill
Definition: distribution_types.h:54
daal::algorithms::distributions::interface1::ParameterBase::engine
engines::EnginePtr engine
Definition: distribution_types.h:81
daal::algorithms::distributions::interface1::Input
Input objects for distributions
Definition: distribution_types.h:88

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