From e9323ec3d8c638462e7269ecbef7d845b6a8b11a Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Tue, 26 Nov 2019 12:50:34 +0000 Subject: Add IsQuantizeType(DataType) for use in validation functions Signed-off-by: Aron Virginas-Tar Change-Id: Ib790b24cfde87c92e29615da942c25bf7c98f95e --- include/armnn/TypesUtils.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/armnn/TypesUtils.hpp') diff --git a/include/armnn/TypesUtils.hpp b/include/armnn/TypesUtils.hpp index 32967c6b42..c8f612f08d 100644 --- a/include/armnn/TypesUtils.hpp +++ b/include/armnn/TypesUtils.hpp @@ -195,6 +195,14 @@ constexpr bool IsQuantizedType() return std::is_integral::value; } +constexpr bool IsQuantizedType(DataType dataType) +{ + return dataType == DataType::QuantisedAsymm8 || + dataType == DataType::QuantisedSymm8 || + dataType == DataType::QuantisedSymm16 || + dataType == DataType::QuantizedSymm8PerAxis; +} + inline std::ostream& operator<<(std::ostream& os, Status stat) { os << GetStatusAsCString(stat); -- cgit v1.2.1