diff options
author | Kevin May <kevin.may@arm.com> | 2021-06-14 11:21:11 +0100 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2021-06-17 11:31:24 +0000 |
commit | dc873f6309784d5fd6914ca5432d32ae6c3de0c2 (patch) | |
tree | abcf1c14d999ab052594e8235eb3646b8d6c6429 | |
parent | 2d71002861e7c709b8f1a22edc023d4ca4e5d044 (diff) | |
download | android-nn-driver-dc873f6309784d5fd6914ca5432d32ae6c3de0c2.tar.gz |
IVGCVSW-5943 Updates for latest Android
* Use the correct method to get memory size
* Remove extra line that was a pre-existing typo
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I807fc6b5d6fe32b28975ae2a98a6179712c26a96
-rw-r--r-- | ArmnnPreparedModel_1_2.cpp | 2 | ||||
-rw-r--r-- | ArmnnPreparedModel_1_3.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/ArmnnPreparedModel_1_2.cpp b/ArmnnPreparedModel_1_2.cpp index c129fd69..83e4aac5 100644 --- a/ArmnnPreparedModel_1_2.cpp +++ b/ArmnnPreparedModel_1_2.cpp @@ -285,7 +285,7 @@ Return<V1_0::ErrorStatus> ArmnnPreparedModel_1_2<HalVersion>::PrepareMemoryForOu return V1_0::ErrorStatus::OUTPUT_INSUFFICIENT_SIZE; } #else - const size_t bufferSize = memPools.at(outputArg.location.poolIndex).getMemory().size; + const size_t bufferSize = memPools.at(outputArg.location.poolIndex).getSize(); if (bufferSize < outputSize) { ALOGW("ArmnnPreparedModel_1_2::Execute failed bufferSize (%s) < outputSize (%s)", diff --git a/ArmnnPreparedModel_1_3.cpp b/ArmnnPreparedModel_1_3.cpp index 5a370321..63918725 100644 --- a/ArmnnPreparedModel_1_3.cpp +++ b/ArmnnPreparedModel_1_3.cpp @@ -492,9 +492,8 @@ Return<V1_3::ErrorStatus> ArmnnPreparedModel_1_3<HalVersion>::PrepareMemoryForOu size_t bufferSize = 0; #if !defined(ARMNN_ANDROID_S) bufferSize = memPools.at(outputArg.location.poolIndex).getHidlMemory().size(); - if (bufferSize < outputSize) #else - bufferSize = memPools.at(outputArg.location.poolIndex).getMemory().size; + bufferSize = memPools.at(outputArg.location.poolIndex).getSize(); #endif if (bufferSize < outputSize) { |