51 #include "algorithms/algorithm.h" 52 #include "data_management/data/numeric_table.h" 53 #include "services/daal_defines.h" 54 #include "algorithms/math/relu_types.h" 75 template<
typename algorithmFPType, Method method, CpuType cpu>
76 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
84 BatchContainer(daal::services::Environment::env *daalEnv);
92 virtual services::Status compute() DAAL_C11_OVERRIDE;
109 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
110 class DAAL_EXPORT Batch :
public daal::algorithms::Analysis<batch>
113 typedef algorithms::math::relu::Input InputType;
114 typedef algorithms::math::relu::Result ResultType;
126 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input)
135 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
141 ResultPtr getResult()
152 services::Status setResult(
const ResultPtr &result)
154 DAAL_CHECK(result, services::ErrorNullResult)
156 _res = _result.get();
157 return services::Status();
167 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 169 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
173 virtual Batch<algorithmFPType, method> *cloneImpl()
const DAAL_C11_OVERRIDE
175 return new Batch<algorithmFPType, method>(*this);
178 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
180 _result.reset(
new ResultType());
181 services::Status s = _result->allocate<algorithmFPType>(&input, NULL, (int) method);
182 _res = _result.get();
188 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
196 using interface1::BatchContainer;
197 using interface1::Batch;
daal::services::interface1::Environment::_envStruct
The environment structure.
Definition: env_detect.h:95
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:79
daal::algorithms::math::relu::interface1::Batch::input
InputType input
Definition: relu.h:160
daal::algorithms::math::relu::interface1::Batch::getResult
ResultPtr getResult()
Definition: relu.h:141
daal::algorithms::math::relu::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: relu.h:135
daal::algorithms::math::relu::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: relu.h:126
daal::algorithms::math::relu::interface1::Result
Results obtained with the compute() method of the rectified linear function in the batch processing m...
Definition: relu_types.h:155
daal::algorithms::math::relu::interface1::BatchContainer
Class containing methods for the rectified linear function computing using algorithmFPType precision ...
Definition: relu.h:76
daal::batch
Definition: daal_defines.h:132
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::math::relu::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: relu.h:152
daal::algorithms::math::relu::interface1::Batch::Batch
Batch()
Definition: relu.h:117
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::math::relu::interface1::Batch
Computes the rectified linear function in the batch processing mode.
Definition: relu.h:110
daal::algorithms::math::relu::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: relu.h:167
daal::services::ErrorNullResult
Definition: error_indexes.h:122