On 29/10/13 8:13 AM, Gerd Heber wrote:

Nick, there's, as usual, no single right answer.

What's the average length of 'offsets' and what's

the length variability?

( 'size_t' is not a good starting point for a machine

independent representation.)

Representing 'offsets' a VLEN has its price: you'll loose

some performance and the ability to use compression on the data set.

If there's a sensible upper bound on the length and only slight

variation in the length, you might stick with a (fixed-size) ARRAY

component.

A compromise would be to separate the two parts of your compound

and have a 'bounding boxes' (+ HDF5 reference) dataset and an 'offsets'

dataset. Entries in the former would be compounds of your

bounding boxes and an HDF5 region reference into a global

'offsets' dataset. (In this simple case, you can think of a region

reference as a (offset, count) pair which references a contiguous

region in a global 'offsets' dataset.)

Hi Gerd,

I have taken your advice and reduce the use of VLEN for only the most essential part (in my case, only one component).

With regards to the variability of the length (in my use case), it varies from 1 ... N x 10^5. For my use case, this single use of VLEN (taking into account the performance penalty) should still be beneficial as it allows me to represent sparse data which I plan to bring into a photorealistic renderer where memory footprint is high on the requirement to render out out-of-core geometry.

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

Reply via email to