aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/graph_node.h
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2023-09-07 20:49:09 +0000
committerEric Kunze <eric.kunze@arm.com>2023-09-15 18:10:01 +0000
commitcf84bc9cccbd5dc2fceae1a81c579e41be3c9a06 (patch)
treeaff6bab02c36c095a62381ac8f68d185bdccbe73 /reference_model/src/graph_node.h
parent00f55bf46fe36bebe44e1365becbeb1e0d9e90c9 (diff)
downloadreference_model-cf84bc9cccbd5dc2fceae1a81c579e41be3c9a06.tar.gz
[reference_model] Support StatefulOps and the tests for CallOnceOp
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I03cb878736ccd7e1f5e1f780d7171949a19a9de2
Diffstat (limited to 'reference_model/src/graph_node.h')
-rw-r--r--reference_model/src/graph_node.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/reference_model/src/graph_node.h b/reference_model/src/graph_node.h
index 440ca04..e10f132 100644
--- a/reference_model/src/graph_node.h
+++ b/reference_model/src/graph_node.h
@@ -254,6 +254,23 @@ public:
return inMainBlock;
}
+ int getEvaluated() const
+ {
+ return evaluated;
+ }
+
+ int setEvaluated()
+ {
+ evaluated = true;
+ return 0;
+ }
+
+ int clearEvaluated()
+ {
+ evaluated = false;
+ return 0;
+ }
+
// Helper functions.
int idiv_check(int input1, int input2, int& result);
int idiv_floor(int input1, int input2);
@@ -318,6 +335,9 @@ protected:
// next-node list.
int onNextNodeList;
+ // Flag indicating that this node has been evaluated before
+ int evaluated;
+
// Required input/output tensor counts for node validation
// -1 means any number is allowed
int requiredInputCount;