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

iterative_solver_batch.h
1 /* file: iterative_solver_batch.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 iterative solver interface interface.
21 //--
22 */
23 
24 #ifndef __ITERATIVE_SOLVER_BATCH_H__
25 #define __ITERATIVE_SOLVER_BATCH_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "services/daal_defines.h"
30 #include "algorithms/optimization_solver/optimization_solver_batch.h"
31 #include "algorithms/optimization_solver/iterative_solver/iterative_solver_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace optimization_solver
38 {
39 namespace iterative_solver
40 {
44 namespace interface1
45 {
54 class DAAL_EXPORT Batch : public optimization_solver::BatchIface
55 {
56 public:
57  typedef algorithms::optimization_solver::iterative_solver::interface1::Input InputType;
58  typedef algorithms::optimization_solver::iterative_solver::interface1::Parameter ParameterType;
59  typedef algorithms::optimization_solver::iterative_solver::interface1::Result ResultType;
60 
61  Batch()
62  {
63  }
64 
71  Batch(const Batch &other)
72  {
73  }
74 
75  virtual ~Batch() {}
76 
81  virtual InputType * getInput() = 0;
82 
87  virtual ParameterType * getParameter() = 0;
88 
93  ResultPtr getResult()
94  {
95  return _result;
96  }
97 
103  virtual services::Status createResult() = 0;
104 
110  services::SharedPtr<Batch> clone() const
111  {
112  return services::SharedPtr<Batch>(cloneImpl());
113  }
114 
115 protected:
116  virtual Batch *cloneImpl() const DAAL_C11_OVERRIDE = 0;
117 
118  ResultPtr _result;
119 };
121 typedef services::SharedPtr<Batch> BatchPtr;
122 
123 } // namespace interface1
124 
128 namespace interface2
129 {
138 class DAAL_EXPORT Batch : public optimization_solver::BatchIface
139 {
140 public:
141  typedef algorithms::optimization_solver::iterative_solver::Input InputType;
142  typedef algorithms::optimization_solver::iterative_solver::Parameter ParameterType;
143  typedef algorithms::optimization_solver::iterative_solver::Result ResultType;
144 
145  Batch()
146  {
147  }
148 
155  Batch(const Batch &other)
156  {
157  }
158 
159  virtual ~Batch() {}
160 
165  virtual InputType * getInput() = 0;
166 
171  virtual ParameterType * getParameter() = 0;
172 
177  ResultPtr getResult()
178  {
179  return _result;
180  }
181 
187  virtual services::Status createResult() = 0;
188 
194  services::SharedPtr<Batch> clone() const
195  {
196  return services::SharedPtr<Batch>(cloneImpl());
197  }
198 
199 protected:
200  virtual Batch *cloneImpl() const DAAL_C11_OVERRIDE = 0;
201 
202  ResultPtr _result;
203 };
205 typedef services::SharedPtr<Batch> BatchPtr;
206 
207 } // namespace interface2
208 using interface2::Batch;
209 using interface2::BatchPtr;
210 
211 } // namespace optimization_solver
212 } // namespace iterative_solver
213 } // namespace algorithm
214 } // namespace daal
215 #endif
daal::algorithms::optimization_solver::iterative_solver::interface1::Batch
Interface for computing the iterative solver in the batch processing mode.
Definition: iterative_solver_batch.h:54
daal::algorithms::optimization_solver::iterative_solver::interface1::Batch::getResult
ResultPtr getResult()
Definition: iterative_solver_batch.h:93
daal::algorithms::optimization_solver::iterative_solver::interface2::Batch::getResult
ResultPtr getResult()
Definition: iterative_solver_batch.h:177
daal_defines.h
daal::algorithms::optimization_solver::iterative_solver::interface2::Batch::Batch
Batch(const Batch &other)
Definition: iterative_solver_batch.h:155
daal::algorithms::optimization_solver::iterative_solver::interface1::Batch::Batch
Batch(const Batch &other)
Definition: iterative_solver_batch.h:71
daal::algorithms::optimization_solver::iterative_solver::interface2::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: iterative_solver_batch.h:194
daal::algorithms::optimization_solver::iterative_solver::interface2::Batch
Interface for computing the iterative solver in the batch processing mode.
Definition: iterative_solver_batch.h:138
daal::algorithms::optimization_solver::iterative_solver::interface1::Input
Input parameters for the iterative solver algorithm
Definition: iterative_solver_types.h:160
daal::algorithms::optimization_solver::iterative_solver::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: iterative_solver_batch.h:110
daal::algorithms::optimization_solver::iterative_solver::interface1::Result
Results obtained with the compute() method of the iterative solver algorithm in the batch processing ...
Definition: iterative_solver_types.h:223
daal::algorithms::optimization_solver::iterative_solver::interface1::Parameter
Parameter base class for the iterative solver algorithm
Definition: iterative_solver_types.h:115

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