aboutsummaryrefslogtreecommitdiff
path: root/service.cpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2020-10-13 17:50:05 +0100
committerMike Kelly <mike.kelly@arm.com>2020-10-13 17:50:05 +0100
commit6df71fd5a6ab655a4e9400c9a42df36e2864f67d (patch)
tree02a3f7a9e115331f7bdcdbe7b00e5d51353c17d3 /service.cpp
parent8fe50c6653e30ce3b2de7278b63610429b30dabe (diff)
downloadandroid-nn-driver-6df71fd5a6ab655a4e9400c9a42df36e2864f67d.tar.gz
IVGCVSW-5335 Documentation for fast_math
* Changed documentation for fast_math to add warning about possibly reduction in precision. * Added -h,--help option to display command line help for the driver. * Added -V,--version option to display ArmNN version information for the driver. * Changed driver to display an error and the command line help if it cannot start for any reason. * Backend no longer defaults to GpuAcc. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I270b10ec9d485fd25e25680fc29ea1fc2b0e8e1d
Diffstat (limited to 'service.cpp')
-rw-r--r--service.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/service.cpp b/service.cpp
index 823f0c75..5191fbfe 100644
--- a/service.cpp
+++ b/service.cpp
@@ -19,6 +19,11 @@ int main(int argc, char** argv)
{
android::sp<ArmnnDriver> driver;
DriverOptions driverOptions(argc, argv);
+
+ if (driverOptions.ShouldExit())
+ {
+ return driverOptions.GetExitCode();
+ }
try
{
driver = new ArmnnDriver(DriverOptions(argc, argv));
@@ -26,6 +31,8 @@ int main(int argc, char** argv)
catch (const std::exception& e)
{
ALOGE("Could not create driver: %s", e.what());
+ std::cout << "Unable to start:" << std::endl
+ << "Could not create driver: " << e.what() << std::endl;
return EXIT_FAILURE;
}
@@ -38,15 +45,19 @@ int main(int argc, char** argv)
catch (const std::exception& e)
{
ALOGE("Could not register service: %s", e.what());
+ std::cout << "Unable to start:" << std::endl
+ << "Could not register service: " << e.what() << std::endl;
return EXIT_FAILURE;
}
+
if (status != android::OK)
{
ALOGE("Could not register service");
+ std::cout << "Unable to start:" << std::endl
+ << "Could not register service" << std::endl;
return EXIT_FAILURE;
}
-
android::hardware::joinRpcThreadpool();
- ALOGE("Service exited!");
- return EXIT_FAILURE;
+ ALOGW("Service exited!");
+ return EXIT_SUCCESS;
}