Implement ArrayHandleGroupVecVariable::GetPortalConst

Previously it was impossible to get an ArrayPortal from an
ArrayHandleGroupVecVariable on the control side (by calling GetPortal or
GetPortalConst). This makes it possible.
This commit is contained in:
Kenneth Moreland 2017-02-14 16:23:39 -07:00
parent 3834afdd43
commit 873ceefc17

@ -211,6 +211,20 @@ public:
const OffsetsArrayHandleType &offsetsArray)
: SourceArray(sourceArray), OffsetsArray(offsetsArray), Valid(true) { }
VTKM_CONT
PortalType GetPortal()
{
return PortalType(this->SourceArray.GetPortalControl(),
this->OffsetsArray.GetPortalControl());
}
VTKM_CONT
PortalConstType GetPortalConst() const
{
return PortalConstType(this->SourceArray.GetPortalConstControl(),
this->OffsetsArray.GetPortalConstControl());
}
VTKM_CONT
vtkm::Id GetNumberOfValues() const
{