• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_HARDWARE_NEURALNETWORKS_V1_0_DEVICE_H
18 #define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_DEVICE_H
19 
20 #include <android/hardware/neuralnetworks/1.0/IDevice.h>
21 #include <android/hardware/neuralnetworks/1.0/IPreparedModel.h>
22 #include <android/hardware/neuralnetworks/1.0/types.h>
23 #include <hidl/MQDescriptor.h>
24 #include <hidl/Status.h>
25 #include <string>
26 
27 namespace android {
28 namespace hardware {
29 namespace neuralnetworks {
30 namespace V1_0 {
31 namespace implementation {
32 
33 using ::android::sp;
34 using ::android::hardware::hidl_array;
35 using ::android::hardware::hidl_memory;
36 using ::android::hardware::hidl_string;
37 using ::android::hardware::hidl_vec;
38 using ::android::hardware::Return;
39 using ::android::hardware::Void;
40 
41 struct Device : public IDevice {
42     Device();
43     ~Device() override;
44 
45     // Methods from IDevice follow.
46     Return<void> getCapabilities(getCapabilities_cb _hidl_cb) override;
47     Return<void> getSupportedOperations(const Model& model,
48                                         getSupportedOperations_cb _hidl_cb) override;
49     Return<ErrorStatus> prepareModel(const Model& model,
50                                      const sp<IPreparedModelCallback>& callback) override;
51     Return<DeviceStatus> getStatus() override;
52 
53    private:
54     DeviceStatus mCurrentStatus;
55 };
56 
57 }  // namespace implementation
58 }  // namespace V1_0
59 }  // namespace neuralnetworks
60 }  // namespace hardware
61 }  // namespace android
62 
63 #endif  // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_DEVICE_H
64