Home | History | Annotate | Download | only in 1.0
      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 #define LOG_TAG "android.hardware.neuralnetworks (at) 1.0-service-hvx"
     18 
     19 #include <android-base/logging.h>
     20 #include <android/hardware/neuralnetworks/1.0/IDevice.h>
     21 #include <hidl/HidlTransportSupport.h>
     22 #include "Device.h"
     23 
     24 // Generated HIDL files
     25 using android::hardware::neuralnetworks::V1_0::IDevice;
     26 using android::hardware::neuralnetworks::V1_0::implementation::Device;
     27 
     28 int main() {
     29     android::sp<IDevice> device = new Device();
     30     android::hardware::configureRpcThreadpool(4, true /* will join */);
     31     if (device->registerAsService("hvx") != android::OK) {
     32         LOG(ERROR) << "Could not register service";
     33         return 1;
     34     }
     35     android::hardware::joinRpcThreadpool();
     36     LOG(ERROR) << "Hvx service exited!";
     37     return 1;
     38 }
     39