39 using namespace fixed_point_arithmetic;
46 "Tensors must all have the same DataType");
48 "Fixed-point position must be the same for both inputs and outputs");
54 const fixed_point<T> fp_scale(scale, fixed_point_position);
59 const fixed_point<T> val1(src1[i], fixed_point_position,
true);
60 fixed_point<T> res(src2[i], fixed_point_position,
true);
63 res =
mul(
mul(res, val1), fp_scale);
67 res = mul<OverflowPolicy::WRAP>(mul<OverflowPolicy::WRAP>(res, val1), fp_scale);
fixed_point< T > mul(fixed_point< T > x, fixed_point< T > y)
SimpleTensor< T > fixed_point_pixel_wise_multiplication(const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, float scale, ConvertPolicy convert_policy)
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
DataType data_type() const override
Data type of the tensor.
TensorShape shape() const override
Shape of the tensor.
This file contains all available output stages for GEMMLowp on OpenCL.
SimpleTensor< T > scale(const SimpleTensor< T > &in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
Simple tensor object that stores elements in a consecutive chunk of memory.
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)
int num_elements() const override
Number of elements of the tensor.
int fixed_point_position() const override
The number of bits for the fractional part of the fixed point numbers.
ConvertPolicy
Policy to handle overflow.