aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/TypesUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn/TypesUtils.hpp')
-rw-r--r--include/armnn/TypesUtils.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/armnn/TypesUtils.hpp b/include/armnn/TypesUtils.hpp
index bb75b18c32..c65eefc510 100644
--- a/include/armnn/TypesUtils.hpp
+++ b/include/armnn/TypesUtils.hpp
@@ -219,15 +219,14 @@ inline float Dequantize(QuantizedType value, float scale, int32_t offset)
return dequantized;
}
-template <armnn::DataType DataType>
-void VerifyTensorInfoDataType(const armnn::TensorInfo & info)
+inline void VerifyTensorInfoDataType(const armnn::TensorInfo & info, armnn::DataType dataType)
{
- if (info.GetDataType() != DataType)
+ if (info.GetDataType() != dataType)
{
std::stringstream ss;
ss << "Unexpected datatype:" << armnn::GetDataTypeName(info.GetDataType())
- << " for tensor:" << info.GetShape()
- << ". The type expected to be: " << armnn::GetDataTypeName(DataType);
+ << " for tensor:" << info.GetShape()
+ << ". The type expected to be: " << armnn::GetDataTypeName(dataType);
throw armnn::Exception(ss.str());
}
}