27 #include "algorithms/engines/mcg59/mcg59_types.h"
28 #include "algorithms/engines/engine.h"
55 template<
typename algorithmFPType, Method method, CpuType cpu>
56 class BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
64 BatchContainer(daal::services::Environment::env *daalEnv);
71 services::Status compute() DAAL_C11_OVERRIDE;
88 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
89 class DAAL_EXPORT Batch :
public engines::BatchBase
92 typedef engines::BatchBase super;
94 typedef typename super::InputType InputType;
95 typedef typename super::ResultType ResultType;
103 static services::SharedPtr<Batch<algorithmFPType, method> > create(
size_t seed = 777);
109 virtual int getMethod() const DAAL_C11_OVERRIDE {
return (
int)method; }
115 ResultPtr getResult() {
return _result; }
123 services::Status setResult(
const ResultPtr& result)
125 DAAL_CHECK(result, services::ErrorNullResult)
127 _res = _result.get();
128 return services::Status();
136 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
138 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
146 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
148 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), NULL, (
int) method);
149 this->_res = this->_result.get();
154 Batch(
size_t seed = 777)
159 Batch(
const Batch<algorithmFPType, method> &other): super(other)
164 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
166 return new Batch<algorithmFPType, method>(*this);
171 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
173 _result.reset(
new ResultType());
179 typedef services::SharedPtr<Batch<> > mcg59Ptr;
180 typedef services::SharedPtr<const Batch<> > mcg59ConstPtr;
183 using interface1::BatchContainer;
184 using interface1::Batch;
185 using interface1::mcg59Ptr;
186 using interface1::mcg59ConstPtr;
daal::batch
Definition: daal_defines.h:112
daal::algorithms::engines::mcg59::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:55
daal::algorithms::engines::mcg59::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: mcg59.h:109
daal::algorithms::engines::mcg59::interface1::Batch
Provides methods for mcg59 engine computations in the batch processing mode.
Definition: mcg59.h:89
daal::algorithms::engines::mcg59::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::engines::mcg59::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: mcg59.h:123
daal::algorithms::engines::mcg59::interface1::BatchContainer
Provides methods to run implementations of the mcg59 engine. This class is associated with the mcg59:...
Definition: mcg59.h:56
daal::algorithms::engines::mcg59::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: mcg59.h:136
daal::algorithms::engines::mcg59::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: mcg59.h:146
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:70
daal::algorithms::engines::mcg59::interface1::Batch::getResult
ResultPtr getResult()
Definition: mcg59.h:115