25 #include "algorithms/engines/mt19937/mt19937_types.h"
26 #include "algorithms/engines/engine.h"
53 template<
typename algorithmFPType, Method method, CpuType cpu>
54 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
62 BatchContainer(daal::services::Environment::env *daalEnv);
69 services::Status compute() DAAL_C11_OVERRIDE;
86 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
87 class DAAL_EXPORT Batch :
public engines::BatchBase
90 typedef engines::BatchBase super;
92 typedef typename super::InputType InputType;
93 typedef typename super::ResultType ResultType;
101 static services::SharedPtr<Batch<algorithmFPType, method> > create(
size_t seed = 777);
107 virtual int getMethod() const DAAL_C11_OVERRIDE {
return (
int)method; }
113 ResultPtr getResult() {
return _result; }
121 services::Status setResult(
const ResultPtr& result)
123 DAAL_CHECK(result, services::ErrorNullResult)
125 _res = _result.get();
126 return services::Status();
134 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
136 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
144 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
146 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), NULL, (
int) method);
147 this->_res = this->_result.get();
152 Batch(
size_t seed = 777)
157 Batch(
const Batch<algorithmFPType, method> &other): super(other)
162 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
164 return new Batch<algorithmFPType, method>(*this);
169 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
171 _result.reset(
new ResultType());
177 typedef services::SharedPtr<Batch<> > mt19937Ptr;
178 typedef services::SharedPtr<const Batch<> > mt19937ConstPtr;
181 using interface1::BatchContainer;
182 using interface1::Batch;
183 using interface1::mt19937Ptr;
184 using interface1::mt19937ConstPtr;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:53
daal::algorithms::engines::mt19937::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: mt19937.h:121
daal::algorithms::engines::mt19937::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: mt19937.h:107
daal::batch
Definition: daal_defines.h:106
daal::algorithms::engines::mt19937::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: mt19937.h:134
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::mt19937::interface1::Batch
Provides methods for mt19937 engine computations in the batch processing mode.
Definition: mt19937.h:87
daal::algorithms::engines::mt19937::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: mt19937.h:144
daal::algorithms::engines::mt19937::interface1::Batch::getResult
ResultPtr getResult()
Definition: mt19937.h:113
daal::algorithms::engines::mt19937::interface1::BatchContainer
Provides methods to run implementations of the mt19937 engine. This class is associated with the mt19...
Definition: mt19937.h:54
daal::services::ErrorNullResult
Definition: error_indexes.h:96