Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a655bb3 authored by Michael Butler's avatar Michael Butler
Browse files

Add HIDL lifetime and protecting callback info to NN README

This CL copies information from
packages/modules/NeuralNetworks/runtime/VersionedInterfaces.cpp and
modifies the description to be more appropriate for the NN HAL utility
code.

Specific sections added to the README:
* "HIDL Interface Lifetimes across Processes"
* "Protecting Asynchronous Calls across HIDL"

Bug: 170289677
Test: mma
Change-Id: Id381895535d708b627f4746687b4d12e16560639
parent 7fae6c35
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
#include <nnapi/hal/ProtectCallback.h>
#include <nnapi/hal/TransferValue.h>

// See hardware/interfaces/neuralnetworks/utils/README.md for more information on HIDL interface
// lifetimes across processes and for protecting asynchronous calls across HIDL.

namespace android::hardware::neuralnetworks::V1_0::utils {

class PreparedModelCallback final : public IPreparedModelCallback,
+4 −0
Original line number Diff line number Diff line
@@ -32,8 +32,12 @@
#include <string>
#include <vector>

// See hardware/interfaces/neuralnetworks/utils/README.md for more information on HIDL interface
// lifetimes across processes and for protecting asynchronous calls across HIDL.

namespace android::hardware::neuralnetworks::V1_0::utils {

// Class that adapts V1_0::IDevice to nn::IDevice.
class Device final : public nn::IDevice {
    struct PrivateConstructorTag {};

+4 −0
Original line number Diff line number Diff line
@@ -29,8 +29,12 @@
#include <utility>
#include <vector>

// See hardware/interfaces/neuralnetworks/utils/README.md for more information on HIDL interface
// lifetimes across processes and for protecting asynchronous calls across HIDL.

namespace android::hardware::neuralnetworks::V1_0::utils {

// Class that adapts V1_0::IPreparedModel to nn::IPreparedModel.
class PreparedModel final : public nn::IPreparedModel {
    struct PrivateConstructorTag {};

+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@

#include <utility>

// See hardware/interfaces/neuralnetworks/utils/README.md for more information on HIDL interface
// lifetimes across processes and for protecting asynchronous calls across HIDL.

namespace android::hardware::neuralnetworks::V1_0::utils {
namespace {

+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@
#include <string>
#include <vector>

// See hardware/interfaces/neuralnetworks/utils/README.md for more information on HIDL interface
// lifetimes across processes and for protecting asynchronous calls across HIDL.

namespace android::hardware::neuralnetworks::V1_0::utils {
namespace {

Loading