Compute Library
 19.11
GCActivationLayer Class Reference

Basic function to run GCActivationLayerKernel. More...

#include <GCActivationLayer.h>

Collaboration diagram for GCActivationLayer:
[legend]

Public Member Functions

 GCActivationLayer (GCRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 GCActivationLayer (const GCActivationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 GCActivationLayer (GCActivationLayer &&)=default
 Default move constructor. More...
 
GCActivationLayeroperator= (const GCActivationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
GCActivationLayeroperator= (GCActivationLayer &&)=default
 Default move assignment operator. More...
 
void configure (IGCTensor *input, IGCTensor *output, ActivationLayerInfo act_info)
 Set the input and output tensor. More...
 
- Public Member Functions inherited from IGCSimpleFunction
 IGCSimpleFunction (GCRuntimeContext *ctx=nullptr)
 Default Constructor. More...
 
 IGCSimpleFunction (const IGCSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 IGCSimpleFunction (IGCSimpleFunction &&)=default
 Default move constructor. More...
 
IGCSimpleFunctionoperator= (const IGCSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
IGCSimpleFunctionoperator= (IGCSimpleFunction &&)=default
 Default move assignment operator. More...
 
void run () override final
 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...
 

Detailed Description

Basic function to run GCActivationLayerKernel.

Note
The function simulates an activation layer with the specified activation function.

Definition at line 39 of file GCActivationLayer.h.

Constructor & Destructor Documentation

◆ GCActivationLayer() [1/3]

GCActivationLayer ( GCRuntimeContext ctx = nullptr)
explicit

Constructor.

Parameters
[in,out]ctxRuntime context to be used by the function

Definition at line 32 of file GCActivationLayer.cpp.

33  : IGCSimpleFunction(ctx)
34 {
35 }
IGCSimpleFunction(GCRuntimeContext *ctx=nullptr)
Default Constructor.

◆ GCActivationLayer() [2/3]

GCActivationLayer ( const GCActivationLayer )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ GCActivationLayer() [3/3]

Default move constructor.

Member Function Documentation

◆ configure()

void configure ( IGCTensor input,
IGCTensor output,
ActivationLayerInfo  act_info 
)

Set the input and output tensor.

Note
If the output tensor is a nullptr, the activation function will be performed in-place
Parameters
[in,out]inputSource tensor. In case of output tensor = nullptr, this tensor will store the result of the activation function. Data types supported: F16/F32.
[out]outputDestination tensor. Data type supported: same as input
[in]act_infoActivation layer parameters.

Definition at line 37 of file GCActivationLayer.cpp.

38 {
39  auto core_ctx = _ctx ? _ctx->core_runtime_context() : /* Legacy */ nullptr;
40 
41  auto k = arm_compute::support::cpp14::make_unique<GCActivationLayerKernel>(core_ctx);
42  k->configure(input, output, act_info);
43  _kernel = std::move(k);
44 }

References arm_compute::test::validation::act_info, and arm_compute::test::validation::input.

Referenced by GCDepthwiseConvolutionLayer3x3::configure(), and GCConvolutionLayer::configure().

◆ operator=() [1/2]

GCActivationLayer& operator= ( const GCActivationLayer )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

GCActivationLayer& operator= ( GCActivationLayer &&  )
default

Default move assignment operator.


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