aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/tensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'reference_model/src/tensor.h')
-rw-r--r--reference_model/src/tensor.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/reference_model/src/tensor.h b/reference_model/src/tensor.h
index fe7336d..203cfec 100644
--- a/reference_model/src/tensor.h
+++ b/reference_model/src/tensor.h
@@ -42,21 +42,27 @@ public:
int setIsSubgraphOutput();
int setIsParentGraphOutput();
- int getIsParentGraphOutput() const
+ bool getIsParentGraphOutput() const
{
return isParentGraphOutput;
}
+ int setIsVariable();
- int getIsSubgraphInput() const
+ bool getIsSubgraphInput() const
{
return isSubgraphInput;
}
- int getIsSubgraphOutput() const
+ bool getIsSubgraphOutput() const
{
return isSubgraphOutput;
}
+ bool getIsVariable() const
+ {
+ return isVariable;
+ }
+
int setProducer(GraphNode* node);
int addConsumer(GraphNode* node);
@@ -269,18 +275,19 @@ public:
return in ? true_str : false_str;
}
- virtual int allocate() = 0;
- virtual int deallocate() = 0;
- virtual bool is_allocated() = 0;
+ virtual int allocate() = 0;
+ virtual int deallocate() = 0;
+ virtual bool is_allocated() const = 0;
protected:
const std::string tensorName;
const DType serializationDtype;
std::vector<int> shape;
const TOSA_REF_TYPE tensorDtype;
- int isValid;
- int isSubgraphInput;
- int isSubgraphOutput;
+ bool isValid;
+ bool isSubgraphInput;
+ bool isSubgraphOutput;
+ bool isVariable;
bool isAllocated;
bool isParentGraphOutput;
@@ -332,7 +339,7 @@ public:
return 0;
}
- virtual bool is_allocated()
+ virtual bool is_allocated() const
{
if (tensor)
{