• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <HalInterfaces.h>
9 
10 #include <log/log.h>
11 
12 #ifdef ARMNN_ANDROID_NN_V1_3 // Using ::android::hardware::neuralnetworks::V1_3
13 
14 #include "1.1/ArmnnDriver.hpp"
15 #include "1.2/ArmnnDriver.hpp"
16 #include "1.3/ArmnnDriver.hpp"
17 
18 namespace armnn_driver
19 {
20 
21 class ArmnnDriver : public hal_1_3::ArmnnDriver
22 {
23 public:
ArmnnDriver(DriverOptions options)24     ArmnnDriver(DriverOptions options)
25         : hal_1_3::ArmnnDriver(std::move(options))
26     {
27         ALOGV("ArmnnDriver::ArmnnDriver()");
28     }
~ArmnnDriver()29     ~ArmnnDriver() {}
30 };
31 
32 } // namespace armnn_driver
33 #elif ARMNN_ANDROID_NN_V1_2 // Using ::android::hardware::neuralnetworks::V1_2
34 
35 #include "1.1/ArmnnDriver.hpp"
36 #include "1.2/ArmnnDriver.hpp"
37 
38 namespace armnn_driver
39 {
40 
41 class ArmnnDriver : public hal_1_2::ArmnnDriver
42 {
43 public:
ArmnnDriver(DriverOptions options)44     ArmnnDriver(DriverOptions options)
45         : hal_1_2::ArmnnDriver(std::move(options))
46     {
47         ALOGV("ArmnnDriver::ArmnnDriver()");
48     }
~ArmnnDriver()49     ~ArmnnDriver() {}
50 };
51 
52 } // namespace armnn_driver
53 #elif ARMNN_ANDROID_NN_V1_1 // Using ::android::hardware::neuralnetworks::V1_1
54 
55 #include "1.1/ArmnnDriver.hpp"
56 
57 namespace armnn_driver
58 {
59 
60 class ArmnnDriver : public hal_1_1::ArmnnDriver
61 {
62 public:
ArmnnDriver(DriverOptions options)63     ArmnnDriver(DriverOptions options)
64         : hal_1_1::ArmnnDriver(std::move(options))
65     {
66         ALOGV("ArmnnDriver::ArmnnDriver()");
67     }
~ArmnnDriver()68     ~ArmnnDriver() {}
69 };
70 
71 } // namespace armnn_driver
72 
73 #else // Fallback to ::android::hardware::neuralnetworks::V1_0
74 
75 #include "1.0/ArmnnDriver.hpp"
76 
77 namespace armnn_driver
78 {
79 
80 class ArmnnDriver : public hal_1_0::ArmnnDriver
81 {
82 public:
ArmnnDriver(DriverOptions options)83     ArmnnDriver(DriverOptions options)
84         : hal_1_0::ArmnnDriver(std::move(options))
85     {
86         ALOGV("ArmnnDriver::ArmnnDriver()");
87     }
~ArmnnDriver()88     ~ArmnnDriver() {}
89 };
90 
91 } // namespace armnn_driver
92 
93 #endif
94