-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement type conversion for simple numeric types #72
Conversation
9aa41ed
to
912af3a
Compare
912af3a
to
3dc9833
Compare
3dc9833
to
21c97eb
Compare
&transfer_info[i].tconv_buf, &transfer_info[i].bkg_buf, NULL, &fill_bkg); | ||
|
||
/* Perform type conversion on response values */ | ||
memset(transfer_info[i].tconv_buf, 0, file_type_size * (size_t)mem_select_npoints); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since TRUE is passed above for clear_tconv_buf
, there's no need to memset it here since it will be allocated with calloc
"failed to parse member of compound type"); | ||
|
||
if (RV_json_values_to_binary_recursive(member_val, member_dtype_id, | ||
(void *)((char *)value_buffer + offset)) < 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably work for packed compound types, but if the compound datatype has padding in it in the same way that the natural C struct likely does, this will be problematic. Best to use H5Tget_member_offset to get the member offsets instead of assuming they're linearly next to each other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this for the functionality it brings, but there are a few minor improvements that can be made in the future.
Several of the helpers here are copied from the DAOS VOL's datatype code.
Tests for this are implemented in HDFGroup/vol-tests#62.
Fix for #6