Skip to content

Methods for iterators #26

@diamog

Description

@diamog

Our old method of iterators comes from PUMI. For example here:
https://github.com/SCOREC/EnGPar/blob/master/test/NgraphTestSuite.cpp#L276-L284

For all iterators besides vertex iterators, this requires allocating memory and subsequently destroying the memory.

A new method came to me when writing the second adjacency iterator that avoids the memory allocation like here:
https://github.com/SCOREC/EnGPar/blob/master/test/NgraphTestSuite.cpp#L432-L437

I'm not exactly sure that the other iterators could be converted this method or not, but if they can be we can avoid these memory allocations. Is there any benefit I'm missing from the old version? Is there a negative in this new method that I'm missing?

This would be a big change internally so there is no rush on decisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions