summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestRemoveDefaultArguments.cpp
diff options
context:
space:
mode:
authorSlava Shklyaev <slavash@google.com>2020-08-13 13:16:03 +0100
committerSlava Shklyaev <slavash@google.com>2020-11-02 10:07:07 +0000
commitcbcaa00003cf5a4597460dbb5f8cb9f992e939e7 (patch)
treefcfc08ec92b731594fc96c586e1207bccce2624d /nn/runtime/test/TestRemoveDefaultArguments.cpp
parente4a030ef549d8d2c279436628c961eb3f70df7d6 (diff)
downloadml-cbcaa00003cf5a4597460dbb5f8cb9f992e939e7.tar.gz
Migrate NNAPI runtime to canonical types
This change replaces most uses of HAL types in the codebase with equivalent canonical types. Later changes will introduce more refactorings. Also removes unused files nn/runtime/test/Bridge.{h,cpp}. Bug: 160669906 Fix: 155923931 Test: NeuralNetworksTest_static (all 7 passes) Test: NeuralNetworksTest_operations Test: NeuralNetworksTest_utils Test: NeuralNetworksTest_logtag Test: nnCache_test Test: BlobCache_test Change-Id: I63fa286e926a096948f1b1b172d1d562c4f52f29 Merged-In: I63fa286e926a096948f1b1b172d1d562c4f52f29 (cherry picked from commit 069993366ce59913ff162ed144749bb8794d990c)
Diffstat (limited to 'nn/runtime/test/TestRemoveDefaultArguments.cpp')
-rw-r--r--nn/runtime/test/TestRemoveDefaultArguments.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/nn/runtime/test/TestRemoveDefaultArguments.cpp b/nn/runtime/test/TestRemoveDefaultArguments.cpp
index 8726adc85..daef6bf60 100644
--- a/nn/runtime/test/TestRemoveDefaultArguments.cpp
+++ b/nn/runtime/test/TestRemoveDefaultArguments.cpp
@@ -98,7 +98,6 @@ const test_helper::TestModel& get_test_model_align_corners_2x2_to_1x1();
namespace android::nn {
namespace {
-using namespace hal;
using sample_driver::SampleDriverPartial;
using Result = test_wrapper::Result;
using WrapperOperandType = test_wrapper::OperandType;
@@ -113,18 +112,18 @@ class TestDriver : public SampleDriverPartial {
public:
TestDriver() : SampleDriverPartial(kTestDriverName) {}
- Return<void> getCapabilities_1_3(getCapabilities_1_3_cb cb) override {
+ hardware::Return<void> getCapabilities_1_3(getCapabilities_1_3_cb cb) override {
cb(V1_3::ErrorStatus::NONE, {/* Placeholder zero-filled capabilities. */});
- return Void();
+ return hardware::Void();
}
void setSupportedInputCount(uint32_t count) { mSupportedInputCount = count; }
private:
- std::vector<bool> getSupportedOperationsImpl(const Model& model) const override {
+ std::vector<bool> getSupportedOperationsImpl(const V1_3::Model& model) const override {
std::vector<bool> supported(model.main.operations.size());
std::transform(model.main.operations.begin(), model.main.operations.end(),
- supported.begin(), [this](const Operation& operation) {
+ supported.begin(), [this](const V1_3::Operation& operation) {
SCOPED_TRACE("operation = " + toString(operation.type));
EXPECT_EQ(operation.inputs.size(), mSupportedInputCount);
return operation.inputs.size() == mSupportedInputCount;