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

kernel_function_types.h
1 /* file: kernel_function_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 // Kernel function parameter structure
19 //--
20 */
21 
22 #ifndef __KERNEL_FUNCTION_TYPES_H__
23 #define __KERNEL_FUNCTION_TYPES_H__
24 
25 #include "data_management/data/homogen_numeric_table.h"
26 
27 namespace daal
28 {
29 namespace algorithms
30 {
40 namespace kernel_function
41 {
46 enum ComputationMode
47 {
48  vectorVector,
49  matrixVector,
50  matrixMatrix
51 };
52 
57 enum InputId
58 {
59  X,
60  Y,
61  lastInputId = Y
62 };
63 
68 enum ResultId
69 {
70  values,
71  lastResultId = values
72 };
73 
77 namespace interface1
78 {
85 /* [ParameterBase source code] */
86 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
87 {
88  ParameterBase(size_t rowIndexX = 0, size_t rowIndexY = 0, size_t rowIndexResult = 0, ComputationMode computationMode = matrixMatrix);
89 
90  size_t rowIndexX;
91  size_t rowIndexY;
92  size_t rowIndexResult;
93  ComputationMode computationMode;
94 };
95 /* [ParameterBase source code] */
96 
101 class DAAL_EXPORT Input : public daal::algorithms::Input
102 {
103 public:
104  Input();
105  Input(const Input& other);
106 
107  virtual ~Input() {}
108 
114  data_management::NumericTablePtr get(InputId id) const;
115 
121  void set(InputId id, const data_management::NumericTablePtr &ptr);
122 
123 protected:
124  services::Status checkCSR() const;
125 
126  services::Status checkDense() const;
127 };
128 
133 class DAAL_EXPORT Result : public daal::algorithms::Result
134 {
135 public:
136  DECLARE_SERIALIZABLE_CAST(Result);
137  Result();
138 
139  virtual ~Result() {};
146  template <typename algorithmFPType>
147  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
148 
154  data_management::NumericTablePtr get(ResultId id) const;
155 
161  void set(ResultId id, const data_management::NumericTablePtr &ptr);
162 
169  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
170 
171 protected:
173  template<typename Archive, bool onDeserialize>
174  services::Status serialImpl(Archive *arch)
175  {
176  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
177  }
178 };
179 typedef services::SharedPtr<Result> ResultPtr;
181 } // namespace interface1
182 using interface1::ParameterBase;
183 using interface1::Input;
184 using interface1::Result;
185 using interface1::ResultPtr;
186 
187 } // namespace kernel_function
188 } // namespace algorithms
189 } // namespace daal
190 #endif
daal::algorithms::kernel_function::ResultId
ResultId
Definition: kernel_function_types.h:68
daal
Definition: algorithm_base_common.h:31
daal::algorithms::kernel_function::interface1::Result
Results obtained with the compute() method of the kernel function algorithm in the batch processing m...
Definition: kernel_function_types.h:133
daal::algorithms::kernel_function::ComputationMode
ComputationMode
Definition: kernel_function_types.h:46
daal::algorithms::kernel_function::interface1::ParameterBase
Optional input objects for the kernel function algorithm.
Definition: kernel_function_types.h:86
daal::algorithms::kernel_function::vectorVector
Definition: kernel_function_types.h:48
daal::algorithms::kernel_function::X
Definition: kernel_function_types.h:59
daal::algorithms::kernel_function::Y
Definition: kernel_function_types.h:60
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexY
size_t rowIndexY
Definition: kernel_function_types.h:91
daal::algorithms::kernel_function::interface1::Input
Input objects for the kernel function algorithm
Definition: kernel_function_types.h:101
daal::algorithms::kernel_function::values
Definition: kernel_function_types.h:70
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexX
size_t rowIndexX
Definition: kernel_function_types.h:90
daal::algorithms::kernel_function::InputId
InputId
Definition: kernel_function_types.h:57
daal::algorithms::kernel_function::matrixMatrix
Definition: kernel_function_types.h:50
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexResult
size_t rowIndexResult
Definition: kernel_function_types.h:92
daal::algorithms::kernel_function::interface1::ParameterBase::computationMode
ComputationMode computationMode
Definition: kernel_function_types.h:93
daal::algorithms::kernel_function::matrixVector
Definition: kernel_function_types.h:49

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