Compute Library
 21.02
GCArithmeticAddition Class Reference

Basic function to run GCArithmeticAdditionKernel. More...

#include <GCArithmeticAddition.h>

Collaboration diagram for GCArithmeticAddition:
[legend]

Public Member Functions

void configure (const IGCTensor *input1, const IGCTensor *input2, IGCTensor *output, ConvertPolicy policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Initialise the kernel's inputs, output and convertion policy. 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...
 

Static Public Member Functions

static Status validate (const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
 Static function to check if given info will lead to a valid configuration of GCArithmeticAddition. More...
 

Detailed Description

Basic function to run GCArithmeticAdditionKernel.

Note
The tensor data type for the inputs must be F16.
The function performs an arithmetic addition between two tensors.
Deprecated:
This function is deprecated and is intended to be removed in 21.05 release

Definition at line 42 of file GCArithmeticAddition.h.

Member Function Documentation

◆ configure()

void configure ( const IGCTensor input1,
const IGCTensor input2,
IGCTensor output,
ConvertPolicy  policy,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)

Initialise the kernel's inputs, output and convertion policy.

Parameters
[in]input1First tensor input. Data types supported: F16.
[in]input2Second tensor input. Data types supported: F16.
[out]outputOutput tensor. Data types supported: F16.
[in]policyPolicy to use to handle overflow.
[in]act_info(Optional) Activation layer information in case of a fused activation. Currently not supported.

Definition at line 32 of file GCArithmeticAddition.cpp.

References ARM_COMPUTE_UNUSED.

33 {
34  ARM_COMPUTE_UNUSED(act_info);
35  auto k = std::make_unique<GCArithmeticAdditionKernel>();
36  k->configure(input1, input2, output, policy);
37  _kernel = std::move(k);
38 }
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:152

◆ validate()

Status validate ( const ITensorInfo input1,
const ITensorInfo input2,
const ITensorInfo output,
ConvertPolicy  policy,
const ActivationLayerInfo act_info = ActivationLayerInfo() 
)
static

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

Parameters
[in]input1First tensor input info. Data types supported: F16.
[in]input2Second tensor input info. Data types supported: F16.
[in]outputOutput tensor info. Data types supported: F16.
[in]policyPolicy to use to handle overflow.
[in]act_info(Optional) Activation layer information in case of a fused activation. Currently not supported.
Returns
a status

Definition at line 40 of file GCArithmeticAddition.cpp.

References ARM_COMPUTE_RETURN_ERROR_ON, ActivationLayerInfo::enabled(), and GCArithmeticAdditionKernel::validate().

41 {
43  return GCArithmeticAdditionKernel::validate(input1, input2, output, policy);
44 }
bool enabled() const
Check if initialised.
Definition: Types.h:1600
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy)
Static function to check if given info will lead to a valid configuration of GCArithmeticAdditionKern...
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:296

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