21.02
|
Basic function to run opencl::kernels::ClActivationKernel. More...
#include <CLActivationLayer.h>
Public Member Functions | |
CLActivationLayer (CLRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
~CLActivationLayer () | |
Destructor. More... | |
CLActivationLayer (const CLActivationLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLActivationLayer (CLActivationLayer &&) | |
Default move constructor. More... | |
CLActivationLayer & | operator= (const CLActivationLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLActivationLayer & | operator= (CLActivationLayer &&) |
Default move assignment operator. More... | |
void | configure (ICLTensor *input, ICLTensor *output, ActivationLayerInfo act_info) |
Set the input and output tensor. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, ActivationLayerInfo act_info) |
Set the input and output tensor. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. 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 CLActivationLayer. More... | |
Basic function to run opencl::kernels::ClActivationKernel.
Definition at line 42 of file CLActivationLayer.h.
CLActivationLayer | ( | CLRuntimeContext * | ctx = nullptr | ) |
Constructor.
[in] | ctx | Runtime context to be used by the function |
Definition at line 43 of file CLActivationLayer.cpp.
References CLActivationLayer::operator=(), and CLActivationLayer::~CLActivationLayer().
|
default |
Destructor.
Referenced by CLActivationLayer::CLActivationLayer().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
void configure | ( | ICLTensor * | input, |
ICLTensor * | output, | ||
ActivationLayerInfo | act_info | ||
) |
Set the input and output tensor.
[in,out] | input | Source tensor. In case of output tensor = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. |
[out] | output | Destination tensor. Data type supported: same as input |
[in] | act_info | Activation layer parameters. |
Definition at line 52 of file CLActivationLayer.cpp.
References CLKernelLibrary::get().
Referenced by CLRNNLayer::configure(), CLDirectConvolutionLayer::configure(), CLFFTConvolutionLayer::configure(), CLLSTMLayerQuantized::configure(), CLLSTMLayer::configure(), CLQLSTMLayer::configure(), CLGEMMConvolutionLayer::configure(), and arm_compute::test::validation::TEST_CASE().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | output, | ||
ActivationLayerInfo | act_info | ||
) |
Set the input and output tensor.
[in] | compile_context | The compile context to be used. |
[in,out] | input | Source tensor. In case of output tensor = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. |
[out] | output | Destination tensor. Data type supported: same as input |
[in] | act_info | Activation layer parameters. |
Definition at line 57 of file CLActivationLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, and arm_compute::test::validation::input.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by CLActivationLayer::CLActivationLayer().
|
default |
Default move assignment operator.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 73 of file CLActivationLayer.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, and ITensorPack::add_tensor().
Referenced by CLRNNLayer::run(), CLDirectConvolutionLayer::run(), CLFFTConvolutionLayer::run(), CLLSTMLayerQuantized::run(), CLLSTMLayer::run(), CLQLSTMLayer::run(), CLGEMMConvolutionLayer::run(), and arm_compute::test::validation::TEST_CASE().
|
static |
Static function to check if given info will lead to a valid configuration of CLActivationLayer.
[in] | input | Source tensor info. In case of output tensor info = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. |
[in] | output | Destination tensor info. Data type supported: same as input |
[in] | act_info | Activation layer information. |
Definition at line 68 of file CLActivationLayer.cpp.
References ClActivation::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), CLRNNLayer::validate(), CLDirectConvolutionLayer::validate(), CLFFTConvolutionLayer::validate(), CLLSTMLayerQuantized::validate(), CLLSTMLayer::validate(), CLQLSTMLayer::validate(), and CLGEMMConvolutionLayer::validate().