aboutsummaryrefslogtreecommitdiff
path: root/include/tosa_serialization_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tosa_serialization_handler.h')
-rw-r--r--include/tosa_serialization_handler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/tosa_serialization_handler.h b/include/tosa_serialization_handler.h
index 5d39228..04dac52 100644
--- a/include/tosa_serialization_handler.h
+++ b/include/tosa_serialization_handler.h
@@ -155,6 +155,15 @@ public:
{
_data = std::move(data);
}
+ void SetDimSize(size_t dim, uint32_t new_size)
+ {
+ if (dim < 0 || dim >= _shape.size())
+ {
+ printf("dim is out of bound\n");
+ assert(0);
+ }
+ _shape[dim] = new_size;
+ }
private:
DType _dtype; /* data type enumeration, see tosa_isa_generated.h */