Compute Library
 21.05
ClActivation Class Reference

Basic function to run kernels::ClActivationKernel. More...

#include <ClActivation.h>

Collaboration diagram for ClActivation:
[legend]

Public Member Functions

 ClActivation ()=default
 Constructor. More...
 
void configure (const ClCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst, const ActivationLayerInfo &activation_info)
 Configure operator for a given list of arguments. More...
 
- Public Member Functions inherited from ICLOperator
 ICLOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLOperator (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLOperator (ICLOperator &&)=default
 Default move constructor. More...
 
ICLOperatoroperator= (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLOperatoroperator= (ICLOperator &&)=default
 Default move assignment operator. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info)
 Static function to check if given info will lead to a valid configuration of ClActivation. More...
 

Detailed Description

Basic function to run kernels::ClActivationKernel.

Definition at line 35 of file ClActivation.h.

Constructor & Destructor Documentation

◆ ClActivation()

ClActivation ( )
default

Constructor.

Member Function Documentation

◆ configure()

void configure ( const ClCompileContext compile_context,
ITensorInfo src,
ITensorInfo dst,
const ActivationLayerInfo activation_info 
)

Configure operator for a given list of arguments.

Parameters
[in]compile_contextThe compile context to be used.
[in]srcSource tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32.
[out]dstDestination tensor info. Data type supported: same as src
[in]activation_infoActivation layer parameters.

Definition at line 33 of file ClActivation.cpp.

34 {
35  auto k = std::make_unique<kernels::ClActivationKernel>();
36  k->configure(compile_context, src, dst, act_info);
37  _kernel = std::move(k);
38 }
SimpleTensor< float > src
Definition: DFT.cpp:155

References arm_compute::test::validation::dst, and arm_compute::test::validation::src.

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst,
const ActivationLayerInfo act_info 
)
static

Static function to check if given info will lead to a valid configuration of ClActivation.

Parameters
[in]srcSource tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32.
[in]dstDestination tensor info. Data type supported: same as src
[in]act_infoActivation layer information.
Returns
a status

Definition at line 40 of file ClActivation.cpp.

41 {
43 }
SimpleTensor< float > src
Definition: DFT.cpp:155
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration of ClActivationKernel.

References arm_compute::test::validation::dst, arm_compute::test::validation::src, and ClActivationKernel::validate().

Referenced by CLActivationLayer::validate().


The documentation for this class was generated from the following files: