summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestNeuralNetworksWrapper.h
diff options
context:
space:
mode:
authorSlava Shklyaev <slavash@google.com>2020-01-30 17:06:25 +0000
committerSlava Shklyaev <slavash@google.com>2020-02-14 15:45:46 +0000
commitf018a4edc6c94abbf6c906002500f09bdbd89db6 (patch)
tree38506ce2e6779ce9a128a1955fe7a48d503daae5 /nn/runtime/test/TestNeuralNetworksWrapper.h
parent4d274101ef688b1dac086f5b7eb3acb2cbbc24d7 (diff)
downloadml-f018a4edc6c94abbf6c906002500f09bdbd89db6.tar.gz
Add control flow support to test harness
This change introduces a new TestModel structure that mirrors the HAL changes in I7a75175f. Bug: 148601177 Bug: 136735929 Test: NNT_static Change-Id: I98a3edd11f9ef74abbe148a2dcf13e8a5f74bc06
Diffstat (limited to 'nn/runtime/test/TestNeuralNetworksWrapper.h')
-rw-r--r--nn/runtime/test/TestNeuralNetworksWrapper.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/nn/runtime/test/TestNeuralNetworksWrapper.h b/nn/runtime/test/TestNeuralNetworksWrapper.h
index a92fc527a..58dea3e64 100644
--- a/nn/runtime/test/TestNeuralNetworksWrapper.h
+++ b/nn/runtime/test/TestNeuralNetworksWrapper.h
@@ -116,9 +116,13 @@ class Model {
mModel = other.mModel;
mNextOperandId = other.mNextOperandId;
mValid = other.mValid;
+ mRelaxed = other.mRelaxed;
+ mFinished = other.mFinished;
other.mModel = nullptr;
other.mNextOperandId = 0;
other.mValid = false;
+ other.mRelaxed = false;
+ other.mFinished = false;
}
return *this;
}
@@ -129,6 +133,7 @@ class Model {
if (result != Result::NO_ERROR) {
mValid = false;
}
+ mFinished = true;
return result;
} else {
return Result::BAD_STATE;
@@ -223,6 +228,7 @@ class Model {
ANeuralNetworksModel* getHandle() const { return mModel; }
bool isValid() const { return mValid; }
bool isRelaxed() const { return mRelaxed; }
+ bool isFinished() const { return mFinished; }
protected:
ANeuralNetworksModel* mModel = nullptr;
@@ -230,6 +236,7 @@ class Model {
uint32_t mNextOperandId = 0;
bool mValid = true;
bool mRelaxed = false;
+ bool mFinished = false;
};
class Compilation {