Skip to content

Iterator maintainence

The convenience functions ArrayPortalToIteratorBegin() and ArrayPortalToIteratorEnd() wouldn't detect specializations of ArrayPortalToIterators<PortalType> since the specializations aren't visible when the Begin/End functions are declared.

Since the CUDA iterators rely on a specialization, the convenience functions would not compile on CUDA.

Now, instead of specializing ArrayPortalToIterators to provide custom iterators for a particular portal, the portal may advertise custom iterators by defining IteratorType, GetIteratorBegin(), and GetIteratorEnd(). ArrayPortalToIterators will detect such portals and automatically switch to using the specialized iterators.

This eliminates the need for the specializations to be visible to the convenience functions and allows them to be usable on CUDA.

Fixes #446 (closed).

Merge request reports