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

neural_networks_prediction_result.h
1 /* file: neural_networks_prediction_result.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 // Implementation of neural network algorithm interface.
45 //--
46 */
47 
48 #ifndef __NEURAL_NETWORKS_PREDICTION_RESULT_H__
49 #define __NEURAL_NETWORKS_PREDICTION_RESULT_H__
50 
51 #include "algorithms/algorithm.h"
52 
53 #include "data_management/data/data_serialize.h"
54 #include "services/daal_defines.h"
55 #include "services/collection.h"
56 #include "neural_networks_prediction_input.h"
57 
58 namespace daal
59 {
60 namespace algorithms
61 {
65 namespace neural_networks
66 {
67 namespace prediction
68 {
77 enum ResultId
78 {
79  prediction,
80  lastResultId = prediction
81 };
82 
87 enum ResultCollectionId
88 {
89  predictionCollection = lastResultId + 1,
90  lastResultCollectionId = predictionCollection
91 };
92 
96 namespace interface1
97 {
102 class DAAL_EXPORT Result : public daal::algorithms::Result
103 {
104 public:
105  DECLARE_SERIALIZABLE_CAST(Result);
106 
107  Result();
108 
114  data_management::TensorPtr get(ResultId id) const;
115 
121  data_management::KeyValueDataCollectionPtr get(ResultCollectionId id) const;
122 
129  data_management::TensorPtr get(ResultCollectionId id, size_t key) const;
130 
136  void set(ResultId id, const data_management::TensorPtr &value);
137 
143  void set(ResultCollectionId id, const data_management::KeyValueDataCollectionPtr &value);
144 
151  void add(ResultCollectionId id, size_t key, const data_management::TensorPtr &value);
152 
161  template<typename algorithmFPType>
162  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
163 
172  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
173 
174 protected:
176  template<typename Archive, bool onDeserialize>
177  services::Status serialImpl(Archive *arch)
178  {
179  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
180  }
181 };
182 typedef services::SharedPtr<Result> ResultPtr;
183 } // namespace interface1
184 using interface1::Result;
185 using interface1::ResultPtr;
186 
188 }
189 }
190 }
191 } // namespace daal
192 #endif
daal::algorithms::neural_networks::prediction::ResultId
ResultId
Definition: neural_networks_prediction_result.h:77
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:79
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:102
daal::algorithms::neural_networks::prediction::ResultCollectionId
ResultCollectionId
Definition: neural_networks_prediction_result.h:87
daal::algorithms::neural_networks::prediction::predictionCollection
Definition: neural_networks_prediction_result.h:89
daal::algorithms::math::abs::value
Definition: abs_types.h:112

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