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 Request] expose ndims in H5Dchunk_iter callback #2437

Open
ZhaoMJ opened this issue Feb 8, 2023 · 1 comment
Open

[Feature Request] expose ndims in H5Dchunk_iter callback #2437

ZhaoMJ opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Type - Improvement Improvements that don't add a new feature or functionality

Comments

@ZhaoMJ
Copy link

ZhaoMJ commented Feb 8, 2023

Is your feature request related to a problem? Please describe.
It's hard to work with the offset array in H5Dchunk_iter callback because we don't know the size of the array. It would be too expensive to call H5Sget_simple_extent_ndims each time.

Describe the solution you'd like
I propose that we should pass ndims to the callback. I.e.

typedef int (*H5D_chunk_iter_op_t)(const hsize_t *offset, unsigned ndims, unsigned filter_mask, haddr_t addr, hsize_t size, void *op_data);

Describe alternatives you've considered
Call H5Sget_simple_extent_ndims in the callback.

Additional context
I'm working on implementing Java binding for H5Dchunk_iter. I don't see there's an easy workaround. I can upload my patch if needed.

@mkitti
Copy link
Contributor

mkitti commented Feb 9, 2023

Why not query the number of dimensions once and embed this in the op_data structure? That is a user defined structure meant for exactly this purpose.

@derobins derobins added Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Component - C Library Core C library issues (usually in the src directory) Type - Improvement Improvements that don't add a new feature or functionality labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. Type - Improvement Improvements that don't add a new feature or functionality
Projects
None yet
Development

No branches or pull requests

4 participants