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

softmax_types.h
1 /* file: softmax_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 the softmax function interface.
21 //--
22 */
23 
24 #ifndef __SOFTMAX_TYPES_H__
25 #define __SOFTMAX_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "data_management/data/homogen_numeric_table.h"
30 #include "services/daal_defines.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace math
40 {
50 namespace softmax
51 {
56 enum Method
57 {
58  defaultDense = 0
59 };
60 
65 enum InputId
66 {
67  data,
68  lastInputId = data
69 };
70 
75 enum ResultId
76 {
77  value,
78  lastResultId = value
79 };
80 
84 namespace interface1
85 {
91 class DAAL_EXPORT Input : public daal::algorithms::Input
92 {
93 public:
98  Input();
99 
104  Input(const Input& other) : daal::algorithms::Input(other){}
105 
106  /*
107  * \DAAL_DEPRECATED
108  */
109  DAAL_DEPRECATED_VIRTUAL virtual ~Input() {}
110 
116  data_management::NumericTablePtr get(InputId id) const;
117 
123  void set(InputId id, const data_management::NumericTablePtr &ptr);
124 
132  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
133 };
134 
140 class DAAL_EXPORT Result : public daal::algorithms::Result
141 {
142 public:
143  DECLARE_SERIALIZABLE_CAST(Result);
148  Result();
149 
150  /*
151  * \DAAL_DEPRECATED
152  */
153  DAAL_DEPRECATED_VIRTUAL virtual ~Result() {};
154 
163  template <typename algorithmFPType>
164  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
165 
171  data_management::NumericTablePtr get(ResultId id) const;
172 
178  void set(ResultId id, const data_management::NumericTablePtr &ptr);
179 
188  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
189 
190 protected:
192  template<typename Archive, bool onDeserialize>
193  services::Status serialImpl(Archive *arch)
194  {
195  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
196  }
197 };
198 typedef services::SharedPtr<Result> ResultPtr;
199 
201 } // namespace interface1
202 using interface1::Input;
203 using interface1::Result;
204 using interface1::ResultPtr;
205 
206 } // namespace softmax
207 } // namespace math
208 } // namespace algorithm
209 } // namespace daal
210 #endif
daal::algorithms::math::softmax::interface1::Input::Input
Input(const Input &other)
Definition: softmax_types.h:104
daal::algorithms::math::softmax::data
Definition: softmax_types.h:67
daal_defines.h
daal::algorithms::math::softmax::InputId
InputId
Definition: softmax_types.h:65
daal::algorithms::math::softmax::ResultId
ResultId
Definition: softmax_types.h:75
daal::algorithms::math::softmax::defaultDense
Definition: softmax_types.h:58
daal::algorithms::math::softmax::interface1::Result
Results obtained with the compute() method of the softmax function in the batch processing mode...
Definition: softmax_types.h:140
daal::algorithms::math::softmax::Method
Method
Definition: softmax_types.h:56
daal::algorithms::math::softmax::value
Definition: softmax_types.h:77
daal::algorithms::math::softmax::interface1::Input
Input objects for the softmax function
Definition: softmax_types.h:91

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