summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/vts/functional/Utils.cpp
diff options
context:
space:
mode:
authorMichael Butler <butlermichael@google.com>2021-02-18 20:18:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-02-18 20:18:41 +0000
commit8548f574eec2fd65aa56c5fbbcb01b78dfb07cc9 (patch)
treed9c6a61969d3dc036fc6885a146ec2a808d70621 /neuralnetworks/aidl/vts/functional/Utils.cpp
parentcb2ba40919f51f19f25cdff72a12bc9f229c96e3 (diff)
parentab2f482af37540942e2d1702e062a29575e8178d (diff)
Merge changes from topic "nnapi-canonical-ahwb"
* changes: Store AHWB in NN canonical memory type -- hal Change NNAPI Memory to ref-counted SharedMemory -- hal
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/Utils.cpp')
-rw-r--r--neuralnetworks/aidl/vts/functional/Utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/neuralnetworks/aidl/vts/functional/Utils.cpp b/neuralnetworks/aidl/vts/functional/Utils.cpp
index 14a496a303..3c7f5f797d 100644
--- a/neuralnetworks/aidl/vts/functional/Utils.cpp
+++ b/neuralnetworks/aidl/vts/functional/Utils.cpp
@@ -135,7 +135,8 @@ void TestBlobAHWB::initialize(uint32_t size) {
ASSERT_EQ(AHardwareBuffer_allocate(&desc, &mAhwb), 0);
ASSERT_NE(mAhwb, nullptr);
- const auto sharedMemory = nn::createSharedMemoryFromAHWB(*mAhwb).value();
+ const auto sharedMemory =
+ nn::createSharedMemoryFromAHWB(mAhwb, /*takeOwnership=*/false).value();
mMapping = nn::map(sharedMemory).value();
mPtr = static_cast<uint8_t*>(std::get<void*>(mMapping.pointer));
CHECK_NE(mPtr, nullptr);