Compute Library
 22.05
square< T, S > Struct Template Reference

Square activation object. More...

#include <NEActivationFunctionDetail.h>

Public Types

using ExactType = typename wrapper::traits::neon_vector< T, S >::type
 SIMD vector type. More...
 
using ExactTagType = typename wrapper::traits::neon_vector< T, S >::tag_type
 SIMD vector tag type. More...
 

Public Member Functions

 square (ActivationLayerInfo act_info)
 Construct a Square activation object. More...
 
void operator() (ExactType &vval)
 Run activation function. More...
 
void operator() (T &val)
 Run activation function. More...
 

Detailed Description

template<typename T, int S>
struct arm_compute::detail::square< T, S >

Square activation object.

Definition at line 113 of file NEActivationFunctionDetail.h.

Member Typedef Documentation

◆ ExactTagType

using ExactTagType = typename wrapper::traits::neon_vector<T, S>::tag_type

SIMD vector tag type.

Definition at line 118 of file NEActivationFunctionDetail.h.

◆ ExactType

using ExactType = typename wrapper::traits::neon_vector<T, S>::type

SIMD vector type.

Definition at line 116 of file NEActivationFunctionDetail.h.

Constructor & Destructor Documentation

◆ square()

square ( ActivationLayerInfo  act_info)
inlineexplicit

Construct a Square activation object.

Parameters
[in]act_infoActivation layer information.

Definition at line 124 of file NEActivationFunctionDetail.h.

References ARM_COMPUTE_UNUSED.

125  {
126  ARM_COMPUTE_UNUSED(act_info);
127  }
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:152

Member Function Documentation

◆ operator()() [1/2]

void operator() ( ExactType vval)
inline

Run activation function.

Parameters
[in]vvalVector of values.

Definition at line 133 of file NEActivationFunctionDetail.h.

References arm_compute::wrapper::vmul().

134  {
135  vval = wrapper::vmul(vval, vval);
136  }
uint8x8_t vmul(const uint8x8_t &a, const uint8x8_t &b)
Definition: mul.h:39

◆ operator()() [2/2]

void operator() ( T &  val)
inline

Run activation function.

Parameters
[in]valScalar value.

Definition at line 142 of file NEActivationFunctionDetail.h.

143  {
144  val = val * val;
145  }

The documentation for this struct was generated from the following file: