diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2017-06-14 18:00:05 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | 0a8334cb78dae66fdc31257a96ba15f7c41bde50 (patch) | |
tree | c8e5f290f8a9a674588e1d67f6a623debf9397f7 /tests/validation/Reference.cpp | |
parent | e5f8fd64a46ce61dac61fd50095a27cfd94930b5 (diff) | |
download | ComputeLibrary-0a8334cb78dae66fdc31257a96ba15f7c41bde50.tar.gz |
COMPMID-400 Add support for 16 bit fixed point arithmetic.
Change-Id: Iebfaef1b219d80d6362b7fd4b1357612b31e43cb
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/77749
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/Reference.cpp')
-rw-r--r-- | tests/validation/Reference.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp index be6ddba633..761bc20ea1 100644 --- a/tests/validation/Reference.cpp +++ b/tests/validation/Reference.cpp @@ -657,20 +657,20 @@ RawTensor Reference::compute_reference_fixed_point_operation(const TensorShape & switch(op) { case(FixedPointOp::INV_SQRT): - min = 32; - max = 127; + min = 1; + max = (dt_in == DataType::QS8) ? 0x7F : 0x7FFF; break; case(FixedPointOp::LOG): min = (1 << (fixed_point_position - 1)); - max = 63; + max = (dt_in == DataType::QS8) ? 0x3F : 0x3FFF; break; case(FixedPointOp::EXP): - min = 1; + min = -(1 << (fixed_point_position - 1)); max = (1 << (fixed_point_position - 1)); break; case(FixedPointOp::RECIPROCAL): min = 15; - max = 100; + max = (dt_in == DataType::QS8) ? 0x7F : 0x7FFF; break; default: ARM_COMPUTE_ERROR("Fixed point operation not supported"); |