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

algorithms/engines/engine.h
1 /* file: engine.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 engine.
19 //--
20 */
21 
22 #ifndef __ENGINE_H__
23 #define __ENGINE_H__
24 
25 #include "algorithms/engines/engine_types.h"
26 
27 namespace daal
28 {
29 namespace algorithms
30 {
31 namespace engines
32 {
37 namespace interface1
38 {
43 class DAAL_EXPORT BatchBase : public daal::algorithms::Analysis<batch>
44 {
45 public:
46  typedef algorithms::engines::Input InputType;
47  typedef algorithms::engines::Result ResultType;
48 
49  InputType input;
51  BatchBase() {}
52  virtual ~BatchBase() {}
53 
60  services::Status saveState(byte* dest) const
61  {
62  return saveStateImpl(dest);
63  }
64 
71  services::Status loadState(const byte* src)
72  {
73  return loadStateImpl(src);
74  }
75 
83  services::Status leapfrog(size_t threadIdx, size_t nThreads)
84  {
85  return leapfrogImpl(threadIdx, nThreads);
86  }
87 
94  services::Status skipAhead(size_t nSkip)
95  {
96  return skipAheadImpl(nSkip);
97  }
98 
104  services::SharedPtr<BatchBase> clone() const
105  {
106  return services::SharedPtr<BatchBase>(cloneImpl());
107  }
108 
109 protected:
110  virtual services::Status saveStateImpl(byte* dest) const { return services::Status(); }
111  virtual services::Status loadStateImpl(const byte* src) { return services::Status(); }
112  virtual services::Status leapfrogImpl(size_t threadNum, size_t nThreads) { return services::Status(services::ErrorMethodNotSupported); }
113  virtual services::Status skipAheadImpl(size_t nSkip) { return services::Status(); }
114  virtual BatchBase *cloneImpl() const = 0;
115 };
116 typedef services::SharedPtr<BatchBase> EnginePtr;
117 
118 } // namespace interface1
119 using interface1::BatchBase;
120 using interface1::EnginePtr;
122 } // namespace engines
123 } // namespace algorithms
124 } // namespace daal
125 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::engines::interface1::BatchBase::saveState
services::Status saveState(byte *dest) const
Definition: algorithms/engines/engine.h:60
daal::algorithms::engines::interface1::BatchBase::loadState
services::Status loadState(const byte *src)
Definition: algorithms/engines/engine.h:71
daal::algorithms::engines::interface1::BatchBase
Class representing an engine.
Definition: algorithms/engines/engine.h:43
daal::algorithms::engines::interface1::BatchBase::leapfrog
services::Status leapfrog(size_t threadIdx, size_t nThreads)
Definition: algorithms/engines/engine.h:83
daal::algorithms::engines::interface1::BatchBase::skipAhead
services::Status skipAhead(size_t nSkip)
Definition: algorithms/engines/engine.h:94
daal::algorithms::engines::interface1::BatchBase::clone
services::SharedPtr< BatchBase > clone() const
Definition: algorithms/engines/engine.h:104
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::engines::interface1::BatchBase::input
InputType input
Definition: algorithms/engines/engine.h:49
daal::services::ErrorMethodNotSupported
Definition: error_indexes.h:69

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