From b847148f5d97f0514098414c010f764da3f75af6 Mon Sep 17 00:00:00 2001 From: saoste01 Date: Wed, 10 Oct 2018 09:44:51 +0100 Subject: IVGCVSW-1961: Add converter method for SQUEEZE to V1.1 section of HalPolicy Change-Id: I15dffef32d394b13e57df134000b7dca4b8788af --- ConversionUtils.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ConversionUtils.hpp') diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index a812183d..165c63b7 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -464,11 +464,15 @@ namespace armnn_driver using namespace android::nn; template -const Operand* GetInputOperand(const HalOperation& operation, uint32_t inputIndex, const HalModel& model) +const Operand* GetInputOperand(const HalOperation& operation, uint32_t inputIndex, const HalModel& model, + bool failOnIndexOutOfBounds = true) { if (inputIndex >= operation.inputs.size()) { - Fail("%s: invalid input index: %i out of %i", __func__, inputIndex, operation.inputs.size()); + if (failOnIndexOutOfBounds) + { + Fail("%s: invalid input index: %i out of %i", __func__, inputIndex, operation.inputs.size()); + } return nullptr; } @@ -1036,4 +1040,4 @@ bool ConvertPooling2d(const HalOperation& operation, } } -} // namespace armnn_driver \ No newline at end of file +} // namespace armnn_driver -- cgit v1.2.1