aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/FixedPoint.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-07-04 12:47:17 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit21efeb4491feab09dc246f4da0023d7ca79b1d32 (patch)
tree2fbacd7676d13a3ec7024e517acf2e462355275a /tests/validation/FixedPoint.h
parent368da83fdd7406d629e8cca64f3eb0af05437419 (diff)
downloadComputeLibrary-21efeb4491feab09dc246f4da0023d7ca79b1d32.tar.gz
COMPMID-417: DepthConvert NEON for QS8/QS16.
Change-Id: Ieb120bccf146045b3a0001ceb3893d4e67fd19df Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79763 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/FixedPoint.h')
-rw-r--r--tests/validation/FixedPoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/validation/FixedPoint.h b/tests/validation/FixedPoint.h
index 53f532cd8c..261fcd6df6 100644
--- a/tests/validation/FixedPoint.h
+++ b/tests/validation/FixedPoint.h
@@ -333,7 +333,7 @@ struct constant_expr
*/
static constexpr T to_fixed(float val, uint8_t p)
{
- return static_cast<T>(val * fixed_one(p) + ((val >= 0) ? 0.5 : -0.5));
+ return static_cast<T>(saturate_cast<float>(val * fixed_one(p) + ((val >= 0) ? 0.5 : -0.5)));
}
/** Clamp value between two ranges
*