diff options
author | Quincey Koziol <koziol@koziol.gov> | 2020-06-05 17:36:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2020-06-05 17:36:20 (GMT) |
commit | de54cff50c419751e0080b6a732facac43f87ba6 (patch) | |
tree | c520135f611179c89a549c5e59a2198248295fea /src | |
parent | 8a2c6d868b70c56622e65cb46e163d2856e1098e (diff) | |
download | hdf5-de54cff50c419751e0080b6a732facac43f87ba6.zip hdf5-de54cff50c419751e0080b6a732facac43f87ba6.tar.gz hdf5-de54cff50c419751e0080b6a732facac43f87ba6.tar.bz2 |
Detect when there's the same-shaped selection of a single block of elements on
both selections, but with different selection types (i.e. one selection defined
as an 'all' type and the other as a hyperslab or point type), without falling
into the generic selection iteration case.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Sselect.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 56f14ba..1072d7d 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1885,6 +1885,15 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2) space_a_dim--; } /* end while */ + + /* Check for a single block in each selection */ + if(H5S_SELECT_IS_SINGLE(space_a) && H5S_SELECT_IS_SINGLE(space_b)) { + /* If both selections are a single block and their bounds are + * the same, then the selections are the same, even if the + * selection types are different. + */ + HGOTO_DONE(TRUE) + } /* end if */ } /* end if */ /* If the dataspaces have the same selection type, use the selection's |