aboutsummaryrefslogtreecommitdiff
path: root/delegate/common/src/DelegateUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/common/src/DelegateUtils.hpp')
-rw-r--r--delegate/common/src/DelegateUtils.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/delegate/common/src/DelegateUtils.hpp b/delegate/common/src/DelegateUtils.hpp
index 96767ff78c..245fc9be90 100644
--- a/delegate/common/src/DelegateUtils.hpp
+++ b/delegate/common/src/DelegateUtils.hpp
@@ -300,4 +300,19 @@ armnn::TensorInfo OutputShapeOfSqueeze(std::vector<uint32_t> squeezeDims,
return outTensorInfo;
}
+bool ZeroDimPresent(std::initializer_list<armnn::TensorInfo> tensorInfoList)
+{
+ for (armnn::TensorInfo tensorInfo : tensorInfoList)
+ {
+ for (unsigned int i = 0; i < tensorInfo.GetNumDimensions(); ++i)
+ {
+ if (tensorInfo.GetShape()[i] == 0)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
} // namespace anonymous