aboutsummaryrefslogtreecommitdiff
path: root/service.cpp
blob: 742091efcabb243dde7adbe3ec53a0587353942d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//

#define LOG_TAG "ArmnnDriver"

#include "ArmnnDriver.hpp"

#include <hidl/LegacySupport.h>
#include <log/log.h>

#include <string>
#include <vector>

using namespace armnn_driver;
using namespace std;

int main(int argc, char** argv)
{
    android::sp<ArmnnDriver> driver = new ArmnnDriver(DriverOptions(argc, argv));

    android::hardware::configureRpcThreadpool(1, true);
    if (driver->registerAsService("armnn") != android::OK)
    {
        ALOGE("Could not register service");
        return 1;
    }
    android::hardware::joinRpcThreadpool();
    ALOGE("Service exited!");
    return 1;
}