aboutsummaryrefslogtreecommitdiff
path: root/Utils.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2023-03-08 10:08:20 +0000
committerMike Kelly <mike.kelly@arm.com>2023-03-08 12:13:33 +0000
commitde547168f108ec1494f18b3ab1ea50bd09f370c1 (patch)
treedaecce0d03ee65c674f7b03672deaefb813239c2 /Utils.hpp
parent4f0d5d18dc7e0ac49a7e105564905d48a88161b1 (diff)
downloadandroid-nn-driver-de547168f108ec1494f18b3ab1ea50bd09f370c1.tar.gz
IVGCVSW-7404 Out of bounds detection
* Added test to ensure that all inputs and outputs do not go out of bounds. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ia97e85f71e46cd2203306243e4dcbc23e0f29ec1
Diffstat (limited to 'Utils.hpp')
-rw-r--r--Utils.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Utils.hpp b/Utils.hpp
index 6e733a26..81be984c 100644
--- a/Utils.hpp
+++ b/Utils.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017-2021,2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -11,6 +11,8 @@
#include <NeuralNetworks.h>
#include <Utils.h>
+#include <fmt/format.h>
+
#include <vector>
#include <string>
#include <fstream>
@@ -194,4 +196,9 @@ inline V1_2::OutputShape ComputeShape(const armnn::TensorInfo& info)
void CommitPools(std::vector<::android::nn::RunTimePoolInfo>& memPools);
+template <typename ErrorStatus, typename Request>
+ErrorStatus ValidateRequestArgument(const Request& request,
+ const armnn::TensorInfo& tensorInfo,
+ const V1_0::RequestArgument& requestArgument,
+ std::string descString);
} // namespace armnn_driver