diff options
author | Michael Butler <butlermichael@google.com> | 2019-07-11 11:45:01 -0700 |
---|---|---|
committer | Michael Butler <butlermichael@google.com> | 2019-07-25 12:15:38 -0700 |
commit | d92f97453da162d14fd08b1e8b17a2270869218f (patch) | |
tree | 0f0bb54b10de9ad276c5755f733f01436841a9da /nn/runtime/test/fibonacci_extension | |
parent | 97a674924a0ee71d2f25c86a80e90c099642bdf2 (diff) | |
download | ml-d92f97453da162d14fd08b1e8b17a2270869218f.tar.gz |
Cleanup HalInterfaces.h
Prior to this CL, HalInterfaces.h polluted the global namespace through
the "using" declarations. This CL creates a new ::android::nn::hal
namespace and places the names there instead.
This CL also changes the namespace of the Callback objects from
::android::hardware::neuralnetworks::V1_2::implementation to
::android::nn to be consistent with the other parts of frameworks/ml/nn.
Fixes: 72880287
Test: mma
Change-Id: I399ad32f5c541a493429c6fa8e192169a903ea9f
Merged-In: I399ad32f5c541a493429c6fa8e192169a903ea9f
(cherry picked from commit 19af9d2d509621c0b07fb5a0f59abd0adb9de468)
Diffstat (limited to 'nn/runtime/test/fibonacci_extension')
-rw-r--r-- | nn/runtime/test/fibonacci_extension/FibonacciDriver.cpp | 2 | ||||
-rw-r--r-- | nn/runtime/test/fibonacci_extension/FibonacciDriver.h | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/nn/runtime/test/fibonacci_extension/FibonacciDriver.cpp b/nn/runtime/test/fibonacci_extension/FibonacciDriver.cpp index 7c1b2af87..85a708b1a 100644 --- a/nn/runtime/test/fibonacci_extension/FibonacciDriver.cpp +++ b/nn/runtime/test/fibonacci_extension/FibonacciDriver.cpp @@ -32,6 +32,8 @@ namespace nn { namespace sample_driver { namespace { +using namespace hal; + const uint8_t kLowBitsType = static_cast<uint8_t>(Model::ExtensionTypeEncoding::LOW_BITS_TYPE); const uint32_t kTypeWithinExtensionMask = (1 << kLowBitsType) - 1; diff --git a/nn/runtime/test/fibonacci_extension/FibonacciDriver.h b/nn/runtime/test/fibonacci_extension/FibonacciDriver.h index d9a43b2a1..5cda2c846 100644 --- a/nn/runtime/test/fibonacci_extension/FibonacciDriver.h +++ b/nn/runtime/test/fibonacci_extension/FibonacciDriver.h @@ -17,6 +17,7 @@ #ifndef FRAMEWORKS_ML_NN_RUNTIME_TEST_FIBONACCI_EXTENSION_FIBONACCI_DRIVER_H #define FRAMEWORKS_ML_NN_RUNTIME_TEST_FIBONACCI_EXTENSION_FIBONACCI_DRIVER_H +#include "HalInterfaces.h" #include "OperationResolver.h" #include "SampleDriver.h" @@ -33,7 +34,7 @@ class FibonacciOperationResolver : public IOperationResolver { return &instance; } - const OperationRegistration* findOperation(OperationType operationType) const override; + const OperationRegistration* findOperation(hal::OperationType operationType) const override; private: FibonacciOperationResolver() {} @@ -44,10 +45,10 @@ class FibonacciOperationResolver : public IOperationResolver { class FibonacciDriver : public SampleDriver { public: FibonacciDriver() : SampleDriver(kDriverName, FibonacciOperationResolver::get()) {} - Return<void> getSupportedExtensions(getSupportedExtensions_cb cb) override; - Return<void> getCapabilities_1_2(getCapabilities_1_2_cb cb) override; - Return<void> getSupportedOperations_1_2(const V1_2::Model& model, - getSupportedOperations_1_2_cb cb) override; + hal::Return<void> getSupportedExtensions(getSupportedExtensions_cb cb) override; + hal::Return<void> getCapabilities_1_2(getCapabilities_1_2_cb cb) override; + hal::Return<void> getSupportedOperations_1_2(const hal::V1_2::Model& model, + getSupportedOperations_1_2_cb cb) override; static constexpr char kDriverName[] = "sample-driver-fibonacci-extension"; }; |