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

Unify read(T*) and write_raw(T*). #870

Closed
1uc opened this issue Nov 27, 2023 · 1 comment
Closed

Unify read(T*) and write_raw(T*). #870

1uc opened this issue Nov 27, 2023 · 1 comment
Labels
v3 Anything that needs to be resolved before `v3`.

Comments

@1uc
Copy link
Collaborator

1uc commented Nov 27, 2023

It's convenient to have the option of telling HighFive to just write from a pointer. Currently, one does this with:

dset.read(ptr);
dset.write_raw(ptr);

We should unify the two. Potentially, important twist to consider are things like std::string* which points to a pre-allocated array of strings. Which can't be used in *_raw because it'll segfault. However, it would make sense for read(ptr) and write(ptr) to use the pre-allocated array of std::strings and then copy the strings into/from the pre-allocated array from/to an internal buffer used to read/write the strings.

@1uc 1uc added the v3 Anything that needs to be resolved before `v3`. label Nov 27, 2023
@1uc 1uc added the ready label Feb 6, 2024
@1uc 1uc closed this as completed Feb 12, 2024
@1uc
Copy link
Collaborator Author

1uc commented Feb 12, 2024

Please consult the migration guide, it might help modernizing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Anything that needs to be resolved before `v3`.
Projects
None yet
Development

No branches or pull requests

1 participant