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

kernel_function_types.h
1 /* file: kernel_function_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Kernel function parameter structure
45 //--
46 */
47 
48 #ifndef __KERNEL_FUNCTION_TYPES_H__
49 #define __KERNEL_FUNCTION_TYPES_H__
50 
51 #include "data_management/data/homogen_numeric_table.h"
52 
53 namespace daal
54 {
55 namespace algorithms
56 {
66 namespace kernel_function
67 {
72 enum ComputationMode
73 {
74  vectorVector,
75  matrixVector,
76  matrixMatrix
77 };
78 
83 enum InputId
84 {
85  X,
86  Y,
87  lastInputId = Y
88 };
89 
94 enum ResultId
95 {
96  values,
97  lastResultId = values
98 };
99 
103 namespace interface1
104 {
111 /* [ParameterBase source code] */
112 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
113 {
114  ParameterBase(size_t rowIndexX = 0, size_t rowIndexY = 0, size_t rowIndexResult = 0, ComputationMode computationMode = matrixMatrix);
115 
116  size_t rowIndexX;
117  size_t rowIndexY;
118  size_t rowIndexResult;
119  ComputationMode computationMode;
120 };
121 /* [ParameterBase source code] */
122 
127 class DAAL_EXPORT Input : public daal::algorithms::Input
128 {
129 public:
130  Input();
131  Input(const Input& other);
132 
133  virtual ~Input() {}
134 
140  data_management::NumericTablePtr get(InputId id) const;
141 
147  void set(InputId id, const data_management::NumericTablePtr &ptr);
148 
149 protected:
150  services::Status checkCSR() const;
151 
152  services::Status checkDense() const;
153 };
154 
159 class DAAL_EXPORT Result : public daal::algorithms::Result
160 {
161 public:
162  DECLARE_SERIALIZABLE_CAST(Result);
163  Result();
164 
165  virtual ~Result() {};
172  template <typename algorithmFPType>
173  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
174 
180  data_management::NumericTablePtr get(ResultId id) const;
181 
187  void set(ResultId id, const data_management::NumericTablePtr &ptr);
188 
195  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
196 
197 protected:
199  template<typename Archive, bool onDeserialize>
200  services::Status serialImpl(Archive *arch)
201  {
202  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
203  }
204 };
205 typedef services::SharedPtr<Result> ResultPtr;
207 } // namespace interface1
208 using interface1::ParameterBase;
209 using interface1::Input;
210 using interface1::Result;
211 using interface1::ResultPtr;
212 
213 } // namespace kernel_function
214 } // namespace algorithms
215 } // namespace daal
216 #endif
daal::algorithms::kernel_function::ResultId
ResultId
Definition: kernel_function_types.h:94
daal
Definition: algorithm_base_common.h:57
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:159
daal::algorithms::kernel_function::ComputationMode
ComputationMode
Definition: kernel_function_types.h:72
daal::algorithms::kernel_function::interface1::ParameterBase
Optional input objects for the kernel function algorithm.
Definition: kernel_function_types.h:112
daal::algorithms::kernel_function::vectorVector
Definition: kernel_function_types.h:74
daal::algorithms::kernel_function::X
Definition: kernel_function_types.h:85
daal::algorithms::kernel_function::Y
Definition: kernel_function_types.h:86
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexY
size_t rowIndexY
Definition: kernel_function_types.h:117
daal::algorithms::kernel_function::interface1::Input
Input objects for the kernel function algorithm
Definition: kernel_function_types.h:127
daal::algorithms::kernel_function::values
Definition: kernel_function_types.h:96
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexX
size_t rowIndexX
Definition: kernel_function_types.h:116
daal::algorithms::kernel_function::InputId
InputId
Definition: kernel_function_types.h:83
daal::algorithms::kernel_function::matrixMatrix
Definition: kernel_function_types.h:76
daal::algorithms::kernel_function::interface1::ParameterBase::rowIndexResult
size_t rowIndexResult
Definition: kernel_function_types.h:118
daal::algorithms::kernel_function::interface1::ParameterBase::computationMode
ComputationMode computationMode
Definition: kernel_function_types.h:119
daal::algorithms::kernel_function::matrixVector
Definition: kernel_function_types.h:75

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