summaryrefslogtreecommitdiffstats
path: root/src/H5Spkg.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2021-01-20 00:42:14 (GMT)
committerGitHub <noreply@github.com>2021-01-20 00:42:14 (GMT)
commita5ffedb8c6c0654ec78c2872ed912610d2e86d64 (patch)
tree9f91fd136154466824447c3672ad28bb510654e9 /src/H5Spkg.h
parent9578160cefb794fc2fde7c8040c945df498b9e4a (diff)
downloadhdf5-a5ffedb8c6c0654ec78c2872ed912610d2e86d64.zip
hdf5-a5ffedb8c6c0654ec78c2872ed912610d2e86d64.tar.gz
hdf5-a5ffedb8c6c0654ec78c2872ed912610d2e86d64.tar.bz2
Improve performance of multiple calls to H5Sget_select_elem_pointlist (#270)
* Cache the pointer to the next point to process after the last call to H5S__get_select_elem_pointlist. This allows the normal process of iterating over the points in batches to be much more efficient, as the library does not need to traverse the entirety of the preceding points every time the funciton is re-entered. * Update RELEASE.txt for point selection iteration performance fix.
Diffstat (limited to 'src/H5Spkg.h')
-rw-r--r--src/H5Spkg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index 8b1922b..5fe8795 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -137,6 +137,11 @@ struct H5S_pnt_list_t {
H5S_pnt_node_t *head; /* Pointer to head of point list */
H5S_pnt_node_t *tail; /* Pointer to tail of point list */
+
+ hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */
+ H5S_pnt_node_t *last_idx_pnt; /* Point after the last returned from H5S__get_select_elem_pointlist().
+ * If we ever add a way to remove points or add points in the middle of
+ * the pointlist we will need to invalidate these fields. */
};
/* Information about hyperslab spans */