Merge changes from topic "libneuralnetworks_common-cleanup" am: ee7a476090 am: f3ac53fa2a am: 14c577fc22 am: 882338aeaa

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1878019

Change-Id: I8069d1136b48b2d36871745a4cd564e60221c411
This commit is contained in:
Michael Butler 2021-11-03 19:48:34 +00:00 committed by Automerger Merge Worker
commit 036adec109
17 changed files with 97 additions and 28 deletions

View file

@ -55,7 +55,7 @@ cc_test {
static_libs: [ static_libs: [
"android.hardware.neuralnetworks@1.0", "android.hardware.neuralnetworks@1.0",
"libgmock", "libgmock",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"neuralnetworks_types", "neuralnetworks_types",
"neuralnetworks_utils_hal_common", "neuralnetworks_utils_hal_common",
"neuralnetworks_utils_hal_1_0", "neuralnetworks_utils_hal_1_0",

View file

@ -50,7 +50,7 @@ cc_library_static {
"libgmock", "libgmock",
"libhidlmemory", "libhidlmemory",
"libneuralnetworks_generated_test_harness", "libneuralnetworks_generated_test_harness",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
], ],
header_libs: [ header_libs: [
"libneuralnetworks_headers", "libneuralnetworks_headers",
@ -81,7 +81,7 @@ cc_test {
"libgmock", "libgmock",
"libhidlmemory", "libhidlmemory",
"libneuralnetworks_generated_test_harness", "libneuralnetworks_generated_test_harness",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
], ],
whole_static_libs: [ whole_static_libs: [
"neuralnetworks_generated_V1_0_example", "neuralnetworks_generated_V1_0_example",

View file

@ -52,7 +52,7 @@ cc_test {
"android.hardware.neuralnetworks@1.0", "android.hardware.neuralnetworks@1.0",
"android.hardware.neuralnetworks@1.1", "android.hardware.neuralnetworks@1.1",
"libgmock", "libgmock",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"neuralnetworks_types", "neuralnetworks_types",
"neuralnetworks_utils_hal_common", "neuralnetworks_utils_hal_common",
"neuralnetworks_utils_hal_1_0", "neuralnetworks_utils_hal_1_0",

View file

@ -48,7 +48,7 @@ cc_test {
"libgmock", "libgmock",
"libhidlmemory", "libhidlmemory",
"libneuralnetworks_generated_test_harness", "libneuralnetworks_generated_test_harness",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
], ],
whole_static_libs: [ whole_static_libs: [
"neuralnetworks_generated_V1_0_example", "neuralnetworks_generated_V1_0_example",

View file

@ -71,7 +71,7 @@ cc_test {
"android.hardware.neuralnetworks@1.1", "android.hardware.neuralnetworks@1.1",
"android.hardware.neuralnetworks@1.2", "android.hardware.neuralnetworks@1.2",
"libgmock", "libgmock",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"neuralnetworks_types", "neuralnetworks_types",
"neuralnetworks_utils_hal_common", "neuralnetworks_utils_hal_common",
"neuralnetworks_utils_hal_1_0", "neuralnetworks_utils_hal_1_0",

View file

@ -71,7 +71,7 @@ cc_test {
"libgmock", "libgmock",
"libhidlmemory", "libhidlmemory",
"libneuralnetworks_generated_test_harness", "libneuralnetworks_generated_test_harness",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
], ],
whole_static_libs: [ whole_static_libs: [
"neuralnetworks_generated_V1_0_example", "neuralnetworks_generated_V1_0_example",

View file

@ -69,7 +69,7 @@ cc_test {
"android.hardware.neuralnetworks@1.2", "android.hardware.neuralnetworks@1.2",
"android.hardware.neuralnetworks@1.3", "android.hardware.neuralnetworks@1.3",
"libgmock", "libgmock",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"neuralnetworks_types", "neuralnetworks_types",
"neuralnetworks_utils_hal_common", "neuralnetworks_utils_hal_common",
"neuralnetworks_utils_hal_1_0", "neuralnetworks_utils_hal_1_0",

View file

@ -75,7 +75,7 @@ cc_test {
"libgmock", "libgmock",
"libhidlmemory", "libhidlmemory",
"libneuralnetworks_generated_test_harness", "libneuralnetworks_generated_test_harness",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"libsync", "libsync",
], ],
whole_static_libs: [ whole_static_libs: [

View file

@ -0,0 +1,17 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nnapi/hal/aidl/BufferTracker.h"

View file

@ -0,0 +1,17 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nnapi/hal/aidl/HalInterfaces.h"

View file

@ -0,0 +1,17 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nnapi/hal/aidl/HalUtils.h"

View file

@ -0,0 +1,17 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nnapi/hal/aidl/ValidateHal.h"

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_BUFFER_TRACKER_H #ifndef ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_BUFFER_TRACKER_H
#define ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_BUFFER_TRACKER_H #define ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_BUFFER_TRACKER_H
#include <android-base/macros.h> #include <android-base/macros.h>
#include <android-base/thread_annotations.h> #include <android-base/thread_annotations.h>
@ -28,8 +28,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "AidlHalInterfaces.h" #include "nnapi/hal/aidl/HalInterfaces.h"
#include "AidlValidateHal.h" #include "nnapi/hal/aidl/ValidateHal.h"
namespace android::nn { namespace android::nn {
@ -116,4 +116,4 @@ class AidlBufferTracker : public std::enable_shared_from_this<AidlBufferTracker>
} // namespace android::nn } // namespace android::nn
#endif // ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_BUFFER_TRACKER_H #endif // ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_BUFFER_TRACKER_H

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_INTERFACES_H #ifndef ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_INTERFACES_H
#define ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_INTERFACES_H #define ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_INTERFACES_H
#include <aidl/android/hardware/neuralnetworks/BnBuffer.h> #include <aidl/android/hardware/neuralnetworks/BnBuffer.h>
#include <aidl/android/hardware/neuralnetworks/BnBurst.h> #include <aidl/android/hardware/neuralnetworks/BnBurst.h>
@ -69,4 +69,4 @@ inline constexpr aidl_hal::Priority kDefaultPriorityAidl = aidl_hal::Priority::M
} // namespace android::nn } // namespace android::nn
#endif // ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_INTERFACES_H #endif // ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_INTERFACES_H

View file

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_UTILS_H #ifndef ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_UTILS_H
#define ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_UTILS_H #define ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_UTILS_H
#include <vector> #include <vector>
#include "AidlHalInterfaces.h" #include "nnapi/hal/aidl/HalInterfaces.h"
namespace android { namespace android {
namespace nn { namespace nn {
@ -49,4 +49,4 @@ bool isNonExtensionScalar(aidl_hal::OperandType type);
} // namespace nn } // namespace nn
} // namespace android } // namespace android
#endif // ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_HAL_UTILS_H #endif // ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_HAL_UTILS_H

View file

@ -14,17 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_VALIDATE_HAL_H #ifndef ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_VALIDATE_HAL_H
#define ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_VALIDATE_HAL_H #define ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_VALIDATE_HAL_H
#include "nnapi/hal/aidl/HalInterfaces.h"
#include <memory> #include <memory>
#include <set> #include <set>
#include <tuple> #include <tuple>
#include <vector> #include <vector>
#include "AidlHalInterfaces.h" #include <nnapi/TypeUtils.h>
#include "nnapi/TypeUtils.h" #include <nnapi/Validation.h>
#include "nnapi/Validation.h"
namespace android { namespace android {
namespace nn { namespace nn {
@ -43,4 +44,4 @@ bool validateMemoryDesc(
} // namespace nn } // namespace nn
} // namespace android } // namespace android
#endif // ANDROID_FRAMEWORKS_ML_NN_COMMON_AIDL_VALIDATE_HAL_H #endif // ANDROID_HARDWARE_INTERFACES_NEURALNETWORKS_AIDL_UTILS_VALIDATE_HAL_H

View file

@ -39,7 +39,7 @@ cc_test {
srcs: ["test/*.cpp"], srcs: ["test/*.cpp"],
static_libs: [ static_libs: [
"libgmock", "libgmock",
"libneuralnetworks_common_hidl", "libneuralnetworks_common",
"neuralnetworks_types", "neuralnetworks_types",
"neuralnetworks_utils_hal_common", "neuralnetworks_utils_hal_common",
], ],