38 template <
typename T1,
typename T2>
49 intermediate_type val =
static_cast<intermediate_type
>(src[i]) + static_cast<intermediate_type>(
dst[i]);
56 template <
typename T1,
typename T2>
59 ARM_COMPUTE_ERROR_ON_MSG(alpha < 0.f || alpha > 1.f,
"Weight (alpha) specified in accumulate_weighted must be within the range [0, 1]");
69 double val = (1. -
static_cast<double>(
alpha)) *
static_cast<intermediate_type
>(
dst[i]) + static_cast<double>(alpha) *
static_cast<intermediate_type
>(src[i]);
70 dst[i] =
static_cast<T2
>(val);
76 template <
typename T1,
typename T2>
86 intermediate_type denom = 1 << shift;
90 intermediate_type val =
static_cast<intermediate_type
>(
dst[i]) + (static_cast<intermediate_type>(src[i]) *
static_cast<intermediate_type
>(src[i]) / denom);
SimpleTensor< T2 > accumulate_squared(const SimpleTensor< T1 > &src, uint32_t shift, DataType output_data_type)
TensorShape shape() const override
Shape of the tensor.
SimpleTensor< T2 > accumulate(const SimpleTensor< T1 > &src, DataType output_data_type)
This file contains all available output stages for GEMMLowp on OpenCL.
std::unique_ptr< AssetsLibrary > library
Simple tensor object that stores elements in a consecutive chunk of memory.
T saturate_cast(T val)
Saturate a value of type T against the numeric limits of type U.
int num_elements() const override
Number of elements of the tensor.
SimpleTensor< T2 > accumulate_weighted(const SimpleTensor< T1 > &src, float alpha, DataType output_data_type)
fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)
DataType
Available data types.
convolution configure & src
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)