bug fixes
This commit is contained in:
@ -223,11 +223,14 @@ public:
|
||||
intermediate = mul_accumulator(alpha_, converted_accumulator); // D = alpha * Accum
|
||||
|
||||
/// Clamping constant value
|
||||
ElementCompute const kClamp =
|
||||
ElementCompute((1U << (sizeof_bits<ElementOutput>::value - 1)) - 1);
|
||||
ElementCompute const kClampMax =
|
||||
ElementCompute(platform::numeric_limits<ElementOutput>::max());
|
||||
|
||||
intermediate = max_accumulator(intermediate, -kClamp - ElementCompute(1));
|
||||
intermediate = min_accumulator(intermediate, kClamp);
|
||||
ElementCompute const kClampMin =
|
||||
ElementCompute(platform::numeric_limits<ElementOutput>::lowest());
|
||||
|
||||
intermediate = max_accumulator(intermediate, kClampMin);
|
||||
intermediate = min_accumulator(intermediate, kClampMax);
|
||||
|
||||
// Convert to destination numeric type
|
||||
NumericArrayConverter<ElementOutput, ElementCompute, kCount, Round> destination_converter;
|
||||
|
||||
Reference in New Issue
Block a user