-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
H5Dchunk_iter offset is not scaled by chunk dimensions #1419
Comments
This is an important inconsistency. @gauteh was this intended? |
Hm, that was probably not intended: I can see in my library code that I scale it when this function is available, and that I don't scale when I use I also noticed that in Line 7487 in 1d59818
Neither it seems that the offset is set here: Line 7391 in 1d59818
|
You're looking at https://docs.hdfgroup.org/hdf5/develop/group___h5_d.html#ga408a49c6ec59c5b65ce4c791f8d26cb0 |
Doh, of course. |
I'll tackle if this unless someone else has started already. |
…t elements, fix HDFGroup#1419 (HDFGroup#1969) * H5Dchunk_iter now passes chunk dimension scaled offsets, fix HDFGroup#1419 * Update docs for H5Dchunk_iter, H5Dget_chunk_info* Modified description for `H5Dchunk_iter`, `H5Dget_chunk_info`, and `H5Dget_chunk_info_by_coord` to the following * offset Logical position of the chunk’s first element in units of dataset elements * filter_mask Bitmask indicating the filters used when the chunk was written * size Chunk size in bytes, 0 if the chunk does not exist
* Revert "Revert H5Dchunk_iter changes in hdf5_1_12_1 (#733)" This reverts commit 10abe9a. * Apply clang-format * Reincorporate spelling fix from #1166 * Incorporate H5Dchunk_iter changes from #161 * Backport to 1.12: Adds a quick for for some egregious chunk_info badness (#722) * Backport to 1.12: Converts testhdf5 macros to h5test macros in chunk_info.c (#1820) The two macro schemes were not designed to work together. Also quiets some MSVC warnings about comparing pointers and integers. * Backport to 1.12: H5Dchunk_iter now passes offsets in units of dataset elements, fix #1419 (#1969) * H5Dchunk_iter now passes chunk dimension scaled offsets, fix #1419 * Update docs for H5Dchunk_iter, H5Dget_chunk_info* Modified description for `H5Dchunk_iter`, `H5Dget_chunk_info`, and `H5Dget_chunk_info_by_coord` to the following * offset Logical position of the chunk’s first element in units of dataset elements * filter_mask Bitmask indicating the filters used when the chunk was written * size Chunk size in bytes, 0 if the chunk does not exist * Sync H5Dchunk_iter documentation with develop * Remove H5VL_DATASET_WAIT references from 1.12 * Backport to 1.12 #161, #1474, review comments Co-authored-by: Dana Robinson <[email protected]>
…FGroup#1419 (HDFGroup#1969) * H5Dchunk_iter now passes chunk dimension scaled offsets, fix HDFGroup#1419 * Update docs for H5Dchunk_iter, H5Dget_chunk_info* Modified description for `H5Dchunk_iter`, `H5Dget_chunk_info`, and `H5Dget_chunk_info_by_coord` to the following * offset Logical position of the chunk’s first element in units of dataset elements * filter_mask Bitmask indicating the filters used when the chunk was written * size Chunk size in bytes, 0 if the chunk does not exist
* Backport H5Dchunk_iter to 1.10 branch * Add some accessory files, test still needs work * Apply proper formatting, and fix compile errors * Remove const from H5D__chunk_iter as per #1700 * Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (#2074) * Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info * Modify chunk_info test to for unsigned / hsize_t types * Fix types in test * Add test_basic_query, helper functions to test/chunk_info.c 1_10 * H5Dchunk_iter now passes offsets in units of dataset elements, fix #1419 (#1969) * H5Dchunk_iter now passes chunk dimension scaled offsets, fix #1419 * Update docs for H5Dchunk_iter, H5Dget_chunk_info* Modified description for `H5Dchunk_iter`, `H5Dget_chunk_info`, and `H5Dget_chunk_info_by_coord` to the following * offset Logical position of the chunk’s first element in units of dataset elements * filter_mask Bitmask indicating the filters used when the chunk was written * size Chunk size in bytes, 0 if the chunk does not exist * Fix regression of #1419 * Add a note about return fail in 1.12 and older for invalid chunk index * Committing clang-format changes * Run clang-format on test/chunk_info.c --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
I'm not very sure if this is intentional but I find it inconsistent with
offset
inH5Dget_chunk_info
.I think the relevant code for
H5Dchunk_iter
is this:hdf5/src/H5Dchunk.c
Lines 7519 to 7520 in 1d59818
Comparing to how the
offset
inH5Dget_chunk_info
is calculated below, there are missing multipliers ofdset->shared->layout.u.chunk.dim[ii]
:hdf5/src/H5Dchunk.c
Lines 7347 to 7349 in 1d59818
In order to use
H5Dchunk_iter
I will need to apply the chunk dimensions multipliers myself. Is this a bug or a conscious design choice? Thanks.The text was updated successfully, but these errors were encountered: