1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ANDROID_ML_NN_COMMON_HAL_INTERFACES_H
18 #define ANDROID_ML_NN_COMMON_HAL_INTERFACES_H
19 
20 #include <android/hardware/neuralnetworks/1.0/IDevice.h>
21 #include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
22 #include <android/hardware/neuralnetworks/1.0/IPreparedModel.h>
23 #include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
24 #include <android/hardware/neuralnetworks/1.0/types.h>
25 #include <android/hardware/neuralnetworks/1.1/IDevice.h>
26 #include <android/hardware/neuralnetworks/1.1/types.h>
27 #include <android/hardware/neuralnetworks/1.2/IDevice.h>
28 #include <android/hardware/neuralnetworks/1.2/IExecutionCallback.h>
29 #include <android/hardware/neuralnetworks/1.2/IPreparedModel.h>
30 #include <android/hardware/neuralnetworks/1.2/IPreparedModelCallback.h>
31 #include <android/hardware/neuralnetworks/1.2/types.h>
32 #include <android/hidl/allocator/1.0/IAllocator.h>
33 #include <android/hidl/memory/1.0/IMemory.h>
34 #include <hidlmemory/mapping.h>
35 
36 using ::android::sp;
37 using ::android::hardware::hidl_array;
38 using ::android::hardware::hidl_handle;
39 using ::android::hardware::hidl_memory;
40 using ::android::hardware::hidl_string;
41 using ::android::hardware::hidl_vec;
42 using ::android::hardware::Return;
43 using ::android::hardware::Void;
44 using ::android::hardware::neuralnetworks::V1_0::DataLocation;
45 using ::android::hardware::neuralnetworks::V1_0::DeviceStatus;
46 using ::android::hardware::neuralnetworks::V1_0::ErrorStatus;
47 using ::android::hardware::neuralnetworks::V1_0::FusedActivationFunc;
48 using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
49 using ::android::hardware::neuralnetworks::V1_0::PerformanceInfo;
50 using ::android::hardware::neuralnetworks::V1_0::Request;
51 using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
52 using ::android::hardware::neuralnetworks::V1_1::ExecutionPreference;
53 using ::android::hardware::neuralnetworks::V1_2::Capabilities;
54 using ::android::hardware::neuralnetworks::V1_2::Constant;
55 using ::android::hardware::neuralnetworks::V1_2::DeviceType;
56 using ::android::hardware::neuralnetworks::V1_2::Extension;
57 using ::android::hardware::neuralnetworks::V1_2::FmqRequestDatum;
58 using ::android::hardware::neuralnetworks::V1_2::FmqResultDatum;
59 using ::android::hardware::neuralnetworks::V1_2::IBurstCallback;
60 using ::android::hardware::neuralnetworks::V1_2::IBurstContext;
61 using ::android::hardware::neuralnetworks::V1_2::IDevice;
62 using ::android::hardware::neuralnetworks::V1_2::IExecutionCallback;
63 using ::android::hardware::neuralnetworks::V1_2::IPreparedModel;
64 using ::android::hardware::neuralnetworks::V1_2::IPreparedModelCallback;
65 using ::android::hardware::neuralnetworks::V1_2::MeasureTiming;
66 using ::android::hardware::neuralnetworks::V1_2::Model;
67 using ::android::hardware::neuralnetworks::V1_2::Operand;
68 using ::android::hardware::neuralnetworks::V1_2::OperandType;
69 using ::android::hardware::neuralnetworks::V1_2::OperandTypeRange;
70 using ::android::hardware::neuralnetworks::V1_2::Operation;
71 using ::android::hardware::neuralnetworks::V1_2::OperationType;
72 using ::android::hardware::neuralnetworks::V1_2::OperationTypeRange;
73 using ::android::hardware::neuralnetworks::V1_2::OutputShape;
74 using ::android::hardware::neuralnetworks::V1_2::SymmPerChannelQuantParams;
75 using ::android::hardware::neuralnetworks::V1_2::Timing;
76 using ::android::hidl::allocator::V1_0::IAllocator;
77 using ::android::hidl::memory::V1_0::IMemory;
78 
79 namespace V1_0 = ::android::hardware::neuralnetworks::V1_0;
80 namespace V1_1 = ::android::hardware::neuralnetworks::V1_1;
81 namespace V1_2 = ::android::hardware::neuralnetworks::V1_2;
82 
83 namespace android {
84 namespace nn {
85 
86 } // namespace nn
87 } // namespace android
88 
89 #endif // ANDROID_ML_NN_COMMON_HAL_INTERFACES_H
90