aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/quant_util.h
diff options
context:
space:
mode:
authorKevin Cheng <kevin.cheng@arm.com>2020-11-11 13:54:06 -0800
committerKevin Cheng <kevin.cheng@arm.com>2020-11-12 11:47:16 -0800
commitaee1facbde25caf27cc34e5ec08eb8bba6af8e18 (patch)
tree0ff32b95e6f32444445ca01c1b47835b52fb955f /reference_model/src/quant_util.h
parent99bea145a050e12f1b5f8301979713d9a9b04e12 (diff)
downloadreference_model-aee1facbde25caf27cc34e5ec08eb8bba6af8e18.tar.gz
Implement and add unit tests for MUL and ARITHMETIC_RIGHT_SHIFT
add .clang-format Add expected failure for RESIZE and RESCALE unit tests Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I33c8afdc8998e8518f2b0e5fabddd36ce3aa2ee9
Diffstat (limited to 'reference_model/src/quant_util.h')
-rw-r--r--reference_model/src/quant_util.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/reference_model/src/quant_util.h b/reference_model/src/quant_util.h
index 3b58b66..f9ac501 100644
--- a/reference_model/src/quant_util.h
+++ b/reference_model/src/quant_util.h
@@ -34,8 +34,7 @@ public:
int32_t& multiplier,
int32_t& shift)
{
- ASSERT_MSG(value > 0,
- "AvgPool2d reciprocal_scale() error: # of elements should be > 1 but is %d", value);
+ ASSERT_MSG(value > 0, "AvgPool2d reciprocal_scale() error: # of elements should be > 1 but is %d", value);
uint32_t value_u32 = (uint32_t)value;
int32_t k = 32 - LEADING_ZEROS_32(value_u32 - 1); // (1<<k)/2 < value <= (1<<k)
int64_t numerator = ((1L << 30) + 1) << k;