diff options
author | Mark Kittisopikul <mkitti@users.noreply.github.com> | 2022-08-16 21:59:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 21:59:55 (GMT) |
commit | 0c1898d6f5707d1844cfcbb4db116ab6dcee77d2 (patch) | |
tree | 329d6d08307e21b85dca5c65a7b742419f94f5c5 /src/H5VLnative_dataset.c | |
parent | d9247ec17e8abe53af0a439e1a1b58ade6ae5310 (diff) | |
download | hdf5-0c1898d6f5707d1844cfcbb4db116ab6dcee77d2.zip hdf5-0c1898d6f5707d1844cfcbb4db116ab6dcee77d2.tar.gz hdf5-0c1898d6f5707d1844cfcbb4db116ab6dcee77d2.tar.bz2 |
Backport H5Dchunk_iter to 1.12 branch (#1970)
* Revert "Revert H5Dchunk_iter changes in hdf5_1_12_1 (#733)"
This reverts commit 10abe9a8b4985a18a0c88615686184d233d7b845.
* 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 <43805+derobins@users.noreply.github.com>
Diffstat (limited to 'src/H5VLnative_dataset.c')
-rw-r--r-- | src/H5VLnative_dataset.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c index ad468b5..939f192 100644 --- a/src/H5VLnative_dataset.c +++ b/src/H5VLnative_dataset.c @@ -587,6 +587,25 @@ H5VL__native_dataset_optional(void *obj, H5VL_dataset_optional_t optional_type, break; } + /* H5Dchunk_iter */ + case H5VL_NATIVE_DATASET_CHUNK_ITER: { + H5D_chunk_iter_op_t op = HDva_arg(arguments, H5D_chunk_iter_op_t); + void *op_data = HDva_arg(arguments, void *); + + /* Sanity check */ + HDassert(dset->shared); + + /* Make sure the dataset is chunked */ + if (H5D_CHUNKED != dset->shared->layout.type) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + + /* Call private function */ + if ((ret_value = H5D__chunk_iter(dset, op, op_data)) < 0) + HERROR(H5E_DATASET, H5E_BADITER, "chunk iteration failed"); + + break; + } + default: HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") } /* end switch */ |