Commit d57c3986 authored by Robert Maynard's avatar Robert Maynard
Browse files

Merge branch 'unify_iterator_syntax' into 'master'

ArrayPortalFromIterators uses the GetIteratorBegin method signature.

This makes all the custom ArrayPortals have the same syntax,
which is nice when writing new backends.

See merge request !48
parents 7c60e764 640aa69b
......@@ -41,6 +41,7 @@ class ArrayPortalFromIterators
{
public:
typedef typename std::iterator_traits<IteratorT>::value_type ValueType;
typedef IteratorT IteratorType;
VTKM_CONT_EXPORT ArrayPortalFromIterators() { }
......@@ -69,7 +70,7 @@ public:
template<class OtherIteratorT>
VTKM_CONT_EXPORT
ArrayPortalFromIterators(const ArrayPortalFromIterators<OtherIteratorT> &src)
: BeginIterator(src.GetRawIterator()), NumberOfValues(src.GetNumberOfValues())
: BeginIterator(src.GetIteratorBegin()), NumberOfValues(src.GetNumberOfValues())
{ }
VTKM_CONT_EXPORT
......@@ -91,7 +92,7 @@ public:
}
VTKM_CONT_EXPORT
IteratorT GetRawIterator() const {
IteratorT GetIteratorBegin() const {
return this->BeginIterator;
}
......@@ -132,7 +133,7 @@ public:
VTKM_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal)
: Iterator(portal.GetRawIterator()),
: Iterator(portal.GetIteratorBegin()),
NumberOfValues(portal.GetNumberOfValues())
{ }
......@@ -144,7 +145,7 @@ public:
VTKM_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal)
: Iterator(portal.GetRawIterator(), portal.GetNumberOfValues()),
: Iterator(portal.GetIteratorBegin(), portal.GetNumberOfValues()),
NumberOfValues(portal.GetNumberOfValues())
{ }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment