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

neural_networks_prediction_result.h
1 /* file: neural_networks_prediction_result.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 neural network algorithm interface.
21 //--
22 */
23 
24 #ifndef __NEURAL_NETWORKS_PREDICTION_RESULT_H__
25 #define __NEURAL_NETWORKS_PREDICTION_RESULT_H__
26 
27 #include "algorithms/algorithm.h"
28 
29 #include "data_management/data/data_serialize.h"
30 #include "services/daal_defines.h"
31 #include "services/collection.h"
32 #include "neural_networks_prediction_input.h"
33 
34 namespace daal
35 {
36 namespace algorithms
37 {
41 namespace neural_networks
42 {
43 namespace prediction
44 {
53 enum ResultId
54 {
55  prediction,
56  lastResultId = prediction
57 };
58 
63 enum ResultCollectionId
64 {
65  predictionCollection = lastResultId + 1,
66  lastResultCollectionId = predictionCollection
67 };
68 
72 namespace interface1
73 {
79 class DAAL_EXPORT Result : public daal::algorithms::Result
80 {
81 public:
82  DECLARE_SERIALIZABLE_CAST(Result);
83 
84  /*
85  * \DAAL_DEPRECATED
86  */
87  Result();
88 
95  DAAL_DEPRECATED data_management::TensorPtr get(ResultId id) const;
96 
103  DAAL_DEPRECATED data_management::KeyValueDataCollectionPtr get(ResultCollectionId id) const;
104 
112  DAAL_DEPRECATED data_management::TensorPtr get(ResultCollectionId id, size_t key) const;
113 
120  DAAL_DEPRECATED void set(ResultId id, const data_management::TensorPtr &value);
121 
128  DAAL_DEPRECATED void set(ResultCollectionId id, const data_management::KeyValueDataCollectionPtr &value);
129 
137  DAAL_DEPRECATED void add(ResultCollectionId id, size_t key, const data_management::TensorPtr &value);
138 
148  template<typename algorithmFPType>
149  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
150 
160  DAAL_DEPRECATED services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
161 
162 protected:
163  /*
164  * \private
165  * \DAAL_DEPRECATED
166  */
167  template<typename Archive, bool onDeserialize>
168  services::Status serialImpl(Archive *arch)
169  {
170  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
171  }
172 };
173 typedef services::SharedPtr<Result> ResultPtr;
174 } // namespace interface1
175 using interface1::Result;
176 using interface1::ResultPtr;
177 
179 }
180 }
181 }
182 } // namespace daal
183 #endif
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::neural_networks::prediction::ResultId
ResultId
Definition: neural_networks_prediction_result.h:53
daal::algorithms::neural_networks::prediction::predictionCollection
Definition: neural_networks_prediction_result.h:65
daal_defines.h
daal::algorithms::neural_networks::prediction::interface1::Result
Provides methods to access result obtained with the compute() method of the neural networks predictio...
Definition: neural_networks_prediction_result.h:79
daal::algorithms::neural_networks::prediction::ResultCollectionId
ResultCollectionId
Definition: neural_networks_prediction_result.h:63
daal::algorithms::math::abs::value
Definition: abs_types.h:88

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