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

neural_networks_prediction_result.h
1 /* file: neural_networks_prediction_result.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 // Implementation of neural network algorithm interface.
19 //--
20 */
21 
22 #ifndef __NEURAL_NETWORKS_PREDICTION_RESULT_H__
23 #define __NEURAL_NETWORKS_PREDICTION_RESULT_H__
24 
25 #include "algorithms/algorithm.h"
26 
27 #include "data_management/data/data_serialize.h"
28 #include "services/daal_defines.h"
29 #include "services/collection.h"
30 #include "neural_networks_prediction_input.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace neural_networks
40 {
41 namespace prediction
42 {
51 enum ResultId
52 {
53  prediction,
54  lastResultId = prediction
55 };
56 
61 enum ResultCollectionId
62 {
63  predictionCollection = lastResultId + 1,
64  lastResultCollectionId = predictionCollection
65 };
66 
70 namespace interface1
71 {
76 class DAAL_EXPORT Result : public daal::algorithms::Result
77 {
78 public:
79  DECLARE_SERIALIZABLE_CAST(Result);
80 
81  Result();
82 
88  data_management::TensorPtr get(ResultId id) const;
89 
95  data_management::KeyValueDataCollectionPtr get(ResultCollectionId id) const;
96 
103  data_management::TensorPtr get(ResultCollectionId id, size_t key) const;
104 
110  void set(ResultId id, const data_management::TensorPtr &value);
111 
117  void set(ResultCollectionId id, const data_management::KeyValueDataCollectionPtr &value);
118 
125  void add(ResultCollectionId id, size_t key, const data_management::TensorPtr &value);
126 
135  template<typename algorithmFPType>
136  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
137 
146  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
147 
148 protected:
150  template<typename Archive, bool onDeserialize>
151  services::Status serialImpl(Archive *arch)
152  {
153  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
154  }
155 };
156 typedef services::SharedPtr<Result> ResultPtr;
157 } // namespace interface1
158 using interface1::Result;
159 using interface1::ResultPtr;
160 
162 }
163 }
164 }
165 } // namespace daal
166 #endif
daal::algorithms::neural_networks::prediction::ResultId
ResultId
Definition: neural_networks_prediction_result.h:51
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:53
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:76
daal::algorithms::neural_networks::prediction::ResultCollectionId
ResultCollectionId
Definition: neural_networks_prediction_result.h:61
daal::algorithms::neural_networks::prediction::predictionCollection
Definition: neural_networks_prediction_result.h:63
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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