Nick, have a look at H5Sselect_elements http://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements
NB: this type of selection cannot be combined with hyperslab selections via union/intersection/difference... G. -----Original Message----- From: Hdf-forum [mailto:[email protected]] On Behalf Of Nicholas Yue Sent: Wednesday, November 20, 2013 7:45 PM To: [email protected] Subject: [Hdf-forum] How to sparsely select from a dataset ? Hi, I have tried googling for the information using keywords such as sparse/random but I believe those key word may have slight different meaning to what I wanted to accomplish. Say I have a dataset containing a billion (10^9) points (dense) I want to read in only a subset, say a 10000 (10^5) but this subset is non-contiguous. Is there a way to do some sort of hyperslab/selection so that one can provide a list of indices and with a single HDF5 call, H5Dread() in the data in the order as specified in the supplied indices ? Do I have to make 10000 individual calls if the request is non-contiguous ? Which HDF5 example code should I refer to for more information ? P.S. I am currently able to read in data individually via hyperslab. I am hoping to find a more efficient way. Cheers -- Nicholas Yue Graphics - RenderMan, Visualization, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
