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

kernel_function_types.h
1 /* file: kernel_function_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 // Kernel function parameter structure
21 //--
22 */
23 
24 #ifndef __KERNEL_FUNCTION_TYPES_H__
25 #define __KERNEL_FUNCTION_TYPES_H__
26 
27 #include "data_management/data/homogen_numeric_table.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
42 namespace kernel_function
43 {
48 enum ComputationMode
49 {
50  vectorVector,
51  matrixVector,
52  matrixMatrix
53 };
54 
59 enum InputId
60 {
61  X,
62  Y,
63  lastInputId = Y
64 };
65 
70 enum ResultId
71 {
72  values,
73  lastResultId = values
74 };
75 
79 namespace interface1
80 {
87 /* [ParameterBase source code] */
88 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
89 {
90  ParameterBase(size_t rowIndexX = 0, size_t rowIndexY = 0, size_t rowIndexResult = 0, ComputationMode computationMode = matrixMatrix);
91 
92  size_t rowIndexX;
93  size_t rowIndexY;
94  size_t rowIndexResult;
95  ComputationMode computationMode;
96 };
97 /* [ParameterBase source code] */
98 
103 class DAAL_EXPORT Input : public daal::algorithms::Input
104 {
105 public:
106  Input();
107  Input(const Input& other);
108 
109  virtual ~Input() {}
110 
116  data_management::NumericTablePtr get(InputId id) const;
117 
123  void set(InputId id, const data_management::NumericTablePtr &ptr);
124 
125 protected:
126  services::Status checkCSR() const;
127 
128  services::Status checkDense() const;
129 };
130 
135 class DAAL_EXPORT Result : public daal::algorithms::Result
136 {
137 public:
138  DECLARE_SERIALIZABLE_CAST(Result);
139  Result();
140 
141  virtual ~Result() {};
148  template <typename algorithmFPType>
149  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
150 
156  data_management::NumericTablePtr get(ResultId id) const;
157 
163  void set(ResultId id, const data_management::NumericTablePtr &ptr);
164 
171  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
172 
173 protected:
175  template<typename Archive, bool onDeserialize>
176  services::Status serialImpl(Archive *arch)
177  {
178  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
179  }
180 };
181 typedef services::SharedPtr<Result> ResultPtr;
183 } // namespace interface1
184 using interface1::ParameterBase;
185 using interface1::Input;
186 using interface1::Result;
187 using interface1::ResultPtr;
188 
189 } // namespace kernel_function
190 } // namespace algorithms
191 } // namespace daal
192 #endif
daal::algorithms::kernel_function::matrixVector
Definition: kernel_function_types.h:51
daal::algorithms::kernel_function::InputId
InputId
Definition: kernel_function_types.h:59
daal::algorithms::kernel_function::interface1::ParameterBase::computationMode
ComputationMode computationMode
Definition: kernel_function_types.h:95
daal::algorithms::kernel_function::X
Definition: kernel_function_types.h:61
daal::algorithms::kernel_function::ComputationMode
ComputationMode
Definition: kernel_function_types.h:48
daal::algorithms::kernel_function::ResultId
ResultId
Definition: kernel_function_types.h:70
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexY
size_t rowIndexY
Definition: kernel_function_types.h:93
daal::algorithms::kernel_function::matrixMatrix
Definition: kernel_function_types.h:52
daal::algorithms::kernel_function::values
Definition: kernel_function_types.h:72
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexResult
size_t rowIndexResult
Definition: kernel_function_types.h:94
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexX
size_t rowIndexX
Definition: kernel_function_types.h:92
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:135
daal::algorithms::kernel_function::Y
Definition: kernel_function_types.h:62
daal::algorithms::kernel_function::interface1::Input
Input objects for the kernel function algorithm
Definition: kernel_function_types.h:103
daal::algorithms::kernel_function::interface1::ParameterBase
Optional input objects for the kernel function algorithm.
Definition: kernel_function_types.h:88
daal::algorithms::kernel_function::vectorVector
Definition: kernel_function_types.h:50

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