[hdf-forum] Restartable iterators

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[hdf-forum] Restartable iterators

James Philbin
Hi,

I'm wondering whether HDF5 supports restartable iterators? H5Giterate
seems to provide for what I need, but has been deprecated in favor of
H5Literate which doesn't seem to mention how the user provided
function can stop the iteration.

Thanks,
James

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] Restartable iterators

Frank Baker

Hi James,

Yes, the new H5L and H5O iterate and visit functions are also restartable.
Description of that functionality was overlooked in the initial 1.8 user
docs, but was recently added to the HDF5 Reference Manual; your query has
prompted me to upload the revisions to the HDF5 website.

The discussion of the operator callback function in the updated H5Ovisit
entry should answer your questions:

        http://hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-Visit

(Since it uses the same operator callback function, H5Lvisit simply
references this discussion.)

If this does not answer your question, please let me know.

Regards,
-- Frank

======================
Frank Baker
HDF Documentation
The HDF Group


At 12:59 +0100 2008-08-18, James Philbin wrote:

>Hi,
>
>I'm wondering whether HDF5 supports restartable iterators? H5Giterate
>seems to provide for what I need, but has been deprecated in favor of
>H5Literate which doesn't seem to mention how the user provided
>function can stop the iteration.
>
>Thanks,
>James
>


----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] Restartable iterators

James Philbin
In reply to this post by James Philbin
Hi Frank,

Thanks for the reply, but the documentation seems misleading for
H5Ovisit, as there doesn't seem to be a way to actually restart the
iteration (i.e. the function doesn't take a hsize_t *idx to start
from). I assume one can only restart the *iterate functions. Is this
correct?

Thanks,
James

On Mon, Aug 18, 2008 at 6:09 PM, Frank Baker <fbaker at hdfgroup.org> wrote:

>
> Hi James,
>
> Yes, the new H5L and H5O iterate and visit functions are also restartable.
> Description of that functionality was overlooked in the initial 1.8 user
> docs, but was recently added to the HDF5 Reference Manual; your query has
> prompted me to upload the revisions to the HDF5 website.
>
> The discussion of the operator callback function in the updated H5Ovisit
> entry should answer your questions:
>
>        http://hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-Visit
>
> (Since it uses the same operator callback function, H5Lvisit simply
> references this discussion.)
>
> If this does not answer your question, please let me know.
>
> Regards,
> -- Frank
>
> ======================
> Frank Baker
> HDF Documentation
> The HDF Group
>
>
> At 12:59 +0100 2008-08-18, James Philbin wrote:
>>
>> Hi,
>>
>> I'm wondering whether HDF5 supports restartable iterators? H5Giterate
>> seems to provide for what I need, but has been deprecated in favor of
>> H5Literate which doesn't seem to mention how the user provided
>> function can stop the iteration.
>>
>> Thanks,
>> James
>>
>
>

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.




Reply | Threaded
Open this post in threaded view
|

[hdf-forum] Restartable iterators

Quincey Koziol
Hi James,

On Aug 19, 2008, at 6:17 AM, James Philbin wrote:

> Hi Frank,
>
> Thanks for the reply, but the documentation seems misleading for
> H5Ovisit, as there doesn't seem to be a way to actually restart the
> iteration (i.e. the function doesn't take a hsize_t *idx to start
> from). I assume one can only restart the *iterate functions. Is this
> correct?

        Yes, you are correct, you can only restart the *iterate routines.  We  
considered adding some way to restart the iteration for the *visit  
routines, but they are more complex because they are traversing the  
full group hierarchy.  We'd have to return some "visitation ID" for  
the internal state of the visitation and it didn't seem like a great  
idea at the time.

        What we generally recommend for more complex situations is that the  
application's iterate/visit callback use the "op_data" parameter for  
storing the information desired from the entire iterate/visit  
operation and then process the [filtered] information in their  
"op_data" data structure after the iterate/visit operation concludes.  
Or, you can make the callback routine smart enough to take whatever  
action is necessary (passing information to it through the "op_data"  
parameter).

        Quincey


> Thanks,
> James
>
> On Mon, Aug 18, 2008 at 6:09 PM, Frank Baker <fbaker at hdfgroup.org>  
> wrote:
>>
>> Hi James,
>>
>> Yes, the new H5L and H5O iterate and visit functions are also  
>> restartable.
>> Description of that functionality was overlooked in the initial 1.8  
>> user
>> docs, but was recently added to the HDF5 Reference Manual; your  
>> query has
>> prompted me to upload the revisions to the HDF5 website.
>>
>> The discussion of the operator callback function in the updated  
>> H5Ovisit
>> entry should answer your questions:
>>
>>       http://hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-Visit
>>
>> (Since it uses the same operator callback function, H5Lvisit simply
>> references this discussion.)
>>
>> If this does not answer your question, please let me know.
>>
>> Regards,
>> -- Frank
>>
>> ======================
>> Frank Baker
>> HDF Documentation
>> The HDF Group
>>
>>
>> At 12:59 +0100 2008-08-18, James Philbin wrote:
>>>
>>> Hi,
>>>
>>> I'm wondering whether HDF5 supports restartable iterators?  
>>> H5Giterate
>>> seems to provide for what I need, but has been deprecated in favor  
>>> of
>>> H5Literate which doesn't seem to mention how the user provided
>>> function can stop the iteration.
>>>
>>> Thanks,
>>> James
>>>
>>
>>
>
> ----------------------------------------------------------------------
> This mailing list is for HDF software users discussion.
> To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org
> .
> To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.
>
>


----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.