diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-02-22 18:09:07 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2021-02-25 11:25:27 +0000 |
commit | 29b49cf1771620233f9c16dfa0214e6d8a64c4d7 (patch) | |
tree | 111ac8261a8ad97e01915d99fce80717facd1b3f /delegate/src/test/TestUtils.cpp | |
parent | 4018b21cd41437f1e1b2e528d5521136f39ff2b1 (diff) | |
download | armnn-29b49cf1771620233f9c16dfa0214e6d8a64c4d7.tar.gz |
IVGCVSW-5401 Implement the FILL operator
* Added FILL operator to TfLite ArmNN Delegate
* Added unit tests
Signed-off-by: David Monahan <david.monahan@arm.com>
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I335ef469ff773fa4305eb87f6e93ae9c03fc6997
Diffstat (limited to 'delegate/src/test/TestUtils.cpp')
-rw-r--r-- | delegate/src/test/TestUtils.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/delegate/src/test/TestUtils.cpp b/delegate/src/test/TestUtils.cpp index 1bc5786112..bbe89904eb 100644 --- a/delegate/src/test/TestUtils.cpp +++ b/delegate/src/test/TestUtils.cpp @@ -52,6 +52,15 @@ void CompareData(int16_t tensor1[], int16_t tensor2[], size_t tensorSize) } } +void CompareData(int32_t tensor1[], int32_t tensor2[], size_t tensorSize) +{ + int32_t tolerance = 1; + for (size_t i = 0; i < tensorSize; i++) + { + CHECK(std::max(tensor1[i], tensor2[i]) - std::min(tensor1[i], tensor2[i]) <= tolerance); + } +} + void CompareData(int8_t tensor1[], int8_t tensor2[], size_t tensorSize) { int8_t tolerance = 1; |