aboutsummaryrefslogtreecommitdiff
path: root/shim/sl/canonical/CanonicalUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shim/sl/canonical/CanonicalUtils.cpp')
-rw-r--r--shim/sl/canonical/CanonicalUtils.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/shim/sl/canonical/CanonicalUtils.cpp b/shim/sl/canonical/CanonicalUtils.cpp
index 622d4b111d..08a728c293 100644
--- a/shim/sl/canonical/CanonicalUtils.cpp
+++ b/shim/sl/canonical/CanonicalUtils.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -152,7 +152,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const Operand& operand)
}
else
{
- bool dimensionsSpecificity[5] = { true, true, true, true, true };
+ std::vector<unsigned char> dimensionsSpecificity(operand.dimensions.size(), true);
int count = 0;
std::for_each(operand.dimensions.data(),
operand.dimensions.data() + operand.dimensions.size(),
@@ -165,7 +165,9 @@ armnn::TensorInfo GetTensorInfoForOperand(const Operand& operand)
count++;
});
- TensorShape tensorShape(operand.dimensions.size(), operand.dimensions.data(), dimensionsSpecificity);
+ TensorShape tensorShape(operand.dimensions.size(),
+ operand.dimensions.data(),
+ reinterpret_cast<const bool *>(dimensionsSpecificity.data()));
ret = TensorInfo(tensorShape, type);
}
}