diff options
author | saoste01 <saoirse.stewart@arm.com> | 2018-10-10 09:44:51 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-22 17:25:39 +0100 |
commit | b847148f5d97f0514098414c010f764da3f75af6 (patch) | |
tree | b04840f72539eae882aefdb2bec9285237f42210 /ConversionUtils.hpp | |
parent | 07dedda93954646d9ed8bf3d468a89634f88f112 (diff) | |
download | android-nn-driver-b847148f5d97f0514098414c010f764da3f75af6.tar.gz |
IVGCVSW-1961: Add converter method for SQUEEZE to V1.1 section of HalPolicy
Change-Id: I15dffef32d394b13e57df134000b7dca4b8788af
Diffstat (limited to 'ConversionUtils.hpp')
-rw-r--r-- | ConversionUtils.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
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<typename HalOperation, typename HalModel> -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 |