Add tiled iterators to ImageBuf#393
Add tiled iterators to ImageBuf#393btdavis wants to merge 8 commits intoAcademySoftwareFoundation:masterfrom btdavis:ibiter
Conversation
There was a problem hiding this comment.
Is there an advantage to having this return a 'const int &' versus just an 'int'?
There was a problem hiding this comment.
Oh, this is left over from testing. I tried to see if reducing function calls would help.
Something like this:
const int &x = iter.x();
const int &y = iter.y();
for (iter, begin, end)
//use refs instead of x(), y()
But the compiler was already inlining and optimizing x() and y() such that it made no real difference.
|
I really like the refactoring of common Iterator/ConstIterator functionality into IteratorBase. I need to read over TiledIterator more carefully, that's where most of the juicy stuff is. Have you seen performance improvement from using TiledIterators? You may only see it for large images, or when operating on images backed by an ImageCache that is being heavily used (and thus making tile access more coherent is likely to be a big advantage). |
|
I have not forgotten about you! I'm in the process of squashing and merging this. Will update shortly. |
|
I'm going to close this pull request. The iterators have been overhauled in the mean time, so this would be an extremely tricky merge. Additionally, I've investigated the timing issues in great detail, and the difference in iterator performance between the usual scanline order iteration and exhausting each tile in turn is minuscule -- not worth complicating the implementation at this time. |
The changes are much easier to follow in the individual commits.