Compute Library
 21.02
CpuActivation Class Reference

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

#include <CpuActivation.h>

Collaboration diagram for CpuActivation:
[legend]

Public Member Functions

 CpuActivation ()=default
 Constructor. More...
 
void configure (const ITensorInfo *input, ITensorInfo *output, const ActivationLayerInfo &activation_info)
 Configure operator for a given list of arguments. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. 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 *input, const ITensorInfo *output, const ActivationLayerInfo &act_info)
 Static function to check if given info will lead to a valid configuration of CpuActivation. More...
 

Detailed Description

Basic function to run kernels::CpuActivationKernel.

Definition at line 34 of file CpuActivation.h.

Constructor & Destructor Documentation

◆ CpuActivation()

CpuActivation ( )
default

Constructor.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo input,
ITensorInfo output,
const ActivationLayerInfo activation_info 
)

Configure operator for a given list of arguments.

Parameters
[in]inputSource tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32.
[out]outputDestination tensor info. Data type supported: same as src
[in]activation_infoActivation layer parameters.

Definition at line 32 of file CpuActivation.cpp.

33 {
34  auto k = std::make_unique<kernels::CpuActivationKernel>();
35  k->configure(input, output, activation_info);
36  _kernel = std::move(k);
37 }

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
const ActivationLayerInfo act_info 
)
static

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

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

Definition at line 39 of file CpuActivation.cpp.

References CpuActivationKernel::validate().

Referenced by NEActivationLayer::validate().

40 {
41  return kernels::CpuActivationKernel::validate(input, output, activation_info);
42 }
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 CpuActivationKernel.

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