aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/armnn/TypeUtils.hpp6
-rw-r--r--src/armnn/test/UtilsTests.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/armnn/TypeUtils.hpp b/src/armnn/TypeUtils.hpp
index 57d019bd69..01a0e6479a 100644
--- a/src/armnn/TypeUtils.hpp
+++ b/src/armnn/TypeUtils.hpp
@@ -33,6 +33,12 @@ struct ResolveTypeImpl<DataType::Float32>
using Type = float;
};
+template<>
+struct ResolveTypeImpl<DataType::Boolean>
+{
+ using Type = bool;
+};
+
template<DataType DT>
using ResolveType = typename ResolveTypeImpl<DT>::Type;
diff --git a/src/armnn/test/UtilsTests.cpp b/src/armnn/test/UtilsTests.cpp
index 67fe73ea80..9933137edc 100644
--- a/src/armnn/test/UtilsTests.cpp
+++ b/src/armnn/test/UtilsTests.cpp
@@ -20,6 +20,7 @@ BOOST_AUTO_TEST_CASE(DataTypeSize)
BOOST_TEST(armnn::GetDataTypeSize(armnn::DataType::Float32) == 4);
BOOST_TEST(armnn::GetDataTypeSize(armnn::DataType::QuantisedAsymm8) == 1);
BOOST_TEST(armnn::GetDataTypeSize(armnn::DataType::Signed32) == 4);
+ BOOST_TEST(armnn::GetDataTypeSize(armnn::DataType::Boolean) == 1);
}
BOOST_AUTO_TEST_CASE(GetDataTypeTest)
@@ -27,6 +28,7 @@ BOOST_AUTO_TEST_CASE(GetDataTypeTest)
BOOST_TEST((armnn::GetDataType<float>() == armnn::DataType::Float32));
BOOST_TEST((armnn::GetDataType<uint8_t>() == armnn::DataType::QuantisedAsymm8));
BOOST_TEST((armnn::GetDataType<int32_t>() == armnn::DataType::Signed32));
+ BOOST_TEST((armnn::GetDataType<bool>() == armnn::DataType::Boolean));
}
BOOST_AUTO_TEST_CASE(PermuteDescriptorWithTooManyMappings)