Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature suggestion] Save/restore UHDM in-memory #902

Open
yurivict opened this issue Apr 2, 2023 · 1 comment
Open

[feature suggestion] Save/restore UHDM in-memory #902

yurivict opened this issue Apr 2, 2023 · 1 comment

Comments

@yurivict
Copy link
Contributor

yurivict commented Apr 2, 2023

Currently Serializer has only methods to serialize to disk:

void Save(const std::filesystem::path& filepath);
const std::vector<vpiHandle> Restore(const std::filesystem::path& filepath);

There shouldn't be a requirement to write/read to disk just in order to serialize/unserialize data for performance reasons. Disk IO often becomes a performance bottleneck. Many places have killed disks.

I suggest that in-memory serialization/unserialization is also supported:

void Save(std::vector<uint8_t>& data);
const std::vector<vpiHandle> Restore(const std::vector<uint8_t>& data);

This can be useful in case UHDMs are stored and used in memory and there is no need to go to disk other than the requirement of the above interface.

@hs-apotell
Copy link
Collaborator

I would recommend this -

void Save(std::ostream& strm);
std::vector<vpiHandle> Restore(std::istream& strm);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants