Commit 28757bda authored by Robert Maynard's avatar Robert Maynard

ArrayHandleVirtual supports comparison operators

parent 4c23f502
......@@ -107,6 +107,34 @@ public:
return *this;
}
/// Like a pointer, two \c ArrayHandles are considered equal if they point
/// to the same location in memory.
///
VTKM_CONT
bool operator==(const ArrayHandle<T, StorageTag>& rhs) const
{
return (this->Storage == rhs.Storage);
}
VTKM_CONT
bool operator!=(const ArrayHandle<T, StorageTag>& rhs) const
{
return (this->Storage != rhs.Storage);
}
template <typename VT, typename ST>
VTKM_CONT bool operator==(const ArrayHandle<VT, ST>&) const
{
return false; // different valuetype and/or storage
}
template <typename VT, typename ST>
VTKM_CONT bool operator!=(const ArrayHandle<VT, ST>&) const
{
return true; // different valuetype and/or storage
}
/// Returns true if this array's storage matches the type passed in.
///
template <typename ArrayHandleType>
......
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