Unclear documentation about serialization
I apologize for such a strong issue title, but I want to clarify the blaze::Archive
documentation: the serialization is not cross-platform, it does not take into account type size, alignment and version of the library itself?
And there is no reasonable way to bypass.
So for cross-platform application where data save/load is required I definitely shouldn't create read/write module based on blaze::Archive()
?
It should only be used within the context of the same operating system, compiler version and blaze library version.
Right?
Comments (2)
-
-
reporter Hi, Klaus!
Thank you for answer.
I have two problem with blaze serialization:
It doesn’t work for complex type like
DynamicVector<DynamicMatrix<int>>
. I suppose that reason is: https://bitbucket.org/blaze-lib/blaze/src/6ce2d5d8951e9b367aad87cc55ac835b054b5964/blaze/math/serialization/VectorSerializer.h?at=master#lines-355
- Log in to comment
Hi Kataev!
Thanks for taking the time to create the issue. To our best knowledge, there are no limitations with respect to switching operating systems, compiler versions and/or the Blaze version when writing archives. Even the size of the written data type is taken into account when switching from a 32-bit operating system to a 64-bit one. The following example demonstrates that the archive is independent of all aspects of the source and target vectors (type of vector, alignment, and padding), but merely represents the content of the vectors. It also demonstrates the runtime checks used to guarantee the correctness:
I hope this answers the question. If you experience any problems when switching systems, please let us know.
Best regards,
Klaus!