Reading the HDF5 Guide section 7.4.2.1 the way to describe hyperslab is to use count
for dimension and offset
for position defaulting block
to 1-s. On the other hand it is entirely possible to create equivalent description by using block
and offset
defaulting count
to a vector of 1-s with proper rank.
Some time ago in a conversation @gheber suggested that the second version, using blocks to describe dimension defaulting count
to 1-s is the right way for doing selection, even though the first one gives the same result.
Today I noticed that when querying the number of selected blocks with H5Sget_select_hyper_nblocks the latter approach, suggested by @gheber returns only a single block selected, whereas the former is proportional the number of elements being selected. – even though the example 7.4.2.1 does the opposite.
The questions: Is there a difference between the two operations in terms of resource usage? Anyone has profiled this? Is the example depicted in 7.4.2.1 is semantically correct?
ps.: strides
are left out on purpose, defaulting it to 1-s of proper rank.
steven