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

Commit 5f14bad2 authored by Michael Butler's avatar Michael Butler Committed by Gerrit Code Review
Browse files

Merge changes Iae9f692f,Ib43f1cb6,I9d4f0c30,I7d06ea35

* changes:
  Move NN HandleError from utils/common to 1.0/utils
  Relocate NN ProtectCallback to 1.0/utils
  Move NN memory utils from utils/common to 1.0/utils
  Remove hal::utils::countNumberOfConsumers
parents 713d22e0 49d95e04
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ cc_library_static {
    export_include_dirs: ["include"],
    cflags: ["-Wthread-safety"],
    static_libs: [
        "libarect",
        "neuralnetworks_types",
        "neuralnetworks_utils_hal_common",
    ],
@@ -40,6 +41,11 @@ cc_library_static {
    export_static_lib_headers: [
        "neuralnetworks_utils_hal_common",
    ],
    target: {
        android: {
            shared_libs: ["libnativewindow"],
        },
    },
}

cc_test {
+2 −1
Original line number Diff line number Diff line
@@ -24,9 +24,10 @@
#include <nnapi/Result.h>
#include <nnapi/Types.h>
#include <nnapi/hal/CommonUtils.h>
#include <nnapi/hal/ProtectCallback.h>
#include <nnapi/hal/TransferValue.h>

#include "nnapi/hal/1.0/ProtectCallback.h"

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

+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ GeneralResult<Operand> unvalidatedConvert(const hal::V1_0::Operand& operand);
GeneralResult<Operation> unvalidatedConvert(const hal::V1_0::Operation& operation);
GeneralResult<Model::OperandValues> unvalidatedConvert(
        const hardware::hidl_vec<uint8_t>& operandValues);
GeneralResult<SharedHandle> unvalidatedConvert(const hardware::hidl_handle& handle);
GeneralResult<SharedMemory> unvalidatedConvert(const hardware::hidl_memory& memory);
GeneralResult<Model> unvalidatedConvert(const hal::V1_0::Model& model);
GeneralResult<Request::Argument> unvalidatedConvert(
@@ -65,6 +66,7 @@ nn::GeneralResult<Operand> unvalidatedConvert(const nn::Operand& operand);
nn::GeneralResult<Operation> unvalidatedConvert(const nn::Operation& operation);
nn::GeneralResult<hidl_vec<uint8_t>> unvalidatedConvert(
        const nn::Model::OperandValues& operandValues);
nn::GeneralResult<hidl_handle> unvalidatedConvert(const nn::SharedHandle& handle);
nn::GeneralResult<hidl_memory> unvalidatedConvert(const nn::SharedMemory& memory);
nn::GeneralResult<Model> unvalidatedConvert(const nn::Model& model);
nn::GeneralResult<RequestArgument> unvalidatedConvert(const nn::Request::Argument& requestArgument);
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@
#include <nnapi/Result.h>
#include <nnapi/Types.h>
#include <nnapi/hal/CommonUtils.h>
#include <nnapi/hal/ProtectCallback.h>

#include "nnapi/hal/1.0/ProtectCallback.h"

#include <functional>
#include <memory>
+1 −1
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@
#include <nnapi/Result.h>
#include <nnapi/Types.h>
#include <nnapi/hal/CommonUtils.h>
#include <nnapi/hal/ProtectCallback.h>

#include "PreparedModel.h"
#include "nnapi/hal/1.0/ProtectCallback.h"

#include <memory>
#include <utility>
Loading