diff options
author | Eric Kunze <eric.kunze@arm.com> | 2022-06-09 21:27:36 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2022-06-13 15:22:10 +0000 |
commit | e659640eeb35a48f16d84825b335580368ec06f1 (patch) | |
tree | 67efbf6b8a6560c9ecb2426792ec243cc54e809b /src/tosa_serialization_handler.cpp | |
parent | ae906de847e225cd0ae44f25bb21fc228707bc4d (diff) | |
download | serialization_lib-e659640eeb35a48f16d84825b335580368ec06f1.tar.gz |
Increment version to 0.25
Also insert the TOSA file identifier in the flatbuffer.
Reports a warning if the identifier is not present when loading.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I1cd4a9cc78e898ba5015e29be1c65cb640dd6a00
Diffstat (limited to 'src/tosa_serialization_handler.cpp')
-rw-r--r-- | src/tosa_serialization_handler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tosa_serialization_handler.cpp b/src/tosa_serialization_handler.cpp index bd2cbb4..32725a0 100644 --- a/src/tosa_serialization_handler.cpp +++ b/src/tosa_serialization_handler.cpp @@ -436,6 +436,10 @@ tosa_err_t TosaSerializationHandler::Clear() tosa_err_t TosaSerializationHandler::Deserialize(const uint8_t* buf) { + if (!TosaGraphBufferHasIdentifier(buf)) + { + printf("WARNING: TOSA file does not have TOSA file identifier\n"); + } auto fb_tosa_graph = GetTosaGraph(buf); auto fb_tosa_version = fb_tosa_graph->version(); auto fb_tosa_blocks = fb_tosa_graph->blocks(); @@ -846,7 +850,7 @@ tosa_err_t TosaSerializationHandler::Serialize() CreateVersion(_builder, TOSA_VERSION_MAJOR, TOSA_VERSION_MINOR, TOSA_VERSION_PATCH, TOSA_VERSION_DRAFT); auto fb_graph = CreateTosaGraph(_builder, fb_version, fb_blocks); - _builder.Finish(fb_graph); + _builder.Finish(fb_graph, TosaGraphIdentifier()); return TOSA_OK; } |