Commit ec88b7dd authored by Allison Vacanti's avatar Allison Vacanti
Browse files

Markup array portals for use in the exec env.

Since we now use a CUDA-aware tuple object to store ArrayHandles and
Portals for the CompositeVector, these must be constructable on
devices.
parent 3159b376
......@@ -66,19 +66,19 @@ public:
/// The total number of values in the array. They are index from 0 to
/// GetNumberOfValues()-1.
///
VTKM_CONT
VTKM_EXEC_CONT
vtkm::Id GetNumberOfValues() const;
/// Gets a value from the array.
///
VTKM_CONT
VTKM_EXEC_CONT
ValueType Get(vtkm::Id index) const;
/// Sets a value in the array. If it is not possible to set a value in the
/// array, this method may error out (for example with a VTKM_ASSERT). In
/// this case the behavior is undefined.
///
VTKM_CONT
VTKM_EXEC_CONT
void Set(vtkm::Id index, const ValueType& value) const;
};
......
......@@ -54,11 +54,11 @@ public:
using IteratorType = IteratorT;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT
VTKM_EXEC_CONT
ArrayPortalFromIterators() {}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT
VTKM_EXEC_CONT
ArrayPortalFromIterators(IteratorT begin, IteratorT end)
: BeginIterator(begin)
{
......@@ -81,7 +81,7 @@ public:
/// type casting that the iterators do (like the non-const to const cast).
///
template <class OtherIteratorT>
VTKM_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators<OtherIteratorT>& src)
VTKM_EXEC_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators<OtherIteratorT>& src)
: BeginIterator(src.GetIteratorBegin())
, NumberOfValues(src.GetNumberOfValues())
{
......@@ -128,7 +128,7 @@ public:
using IteratorType = IteratorT;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT
VTKM_EXEC_CONT
ArrayPortalFromIterators()
: BeginIterator(nullptr)
, NumberOfValues(0)
......@@ -136,7 +136,7 @@ public:
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT
VTKM_EXEC_CONT
ArrayPortalFromIterators(IteratorT begin, IteratorT end)
: BeginIterator(begin)
{
......@@ -159,7 +159,7 @@ public:
/// type casting that the iterators do (like the non-const to const cast).
///
template <class OtherIteratorT>
VTKM_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators<OtherIteratorT>& src)
VTKM_EXEC_CONT ArrayPortalFromIterators(const ArrayPortalFromIterators<OtherIteratorT>& src)
: BeginIterator(src.GetIteratorBegin())
, NumberOfValues(src.GetNumberOfValues())
{
......
Supports Markdown
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