Fix compile errors and warnings related to new CellLocator structure
This commit is contained in:
parent
47429a3164
commit
23c823d4b4
@ -14,6 +14,8 @@ namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
CellLocator::~CellLocator() = default;
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ class VTKM_CONT_EXPORT VTKM_DEPRECATED(
|
||||
"CellLocator with virtual methods no longer supported. Use CellLocatorGeneral.") CellLocator
|
||||
: public vtkm::cont::ExecutionObjectBase
|
||||
{
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
|
||||
public:
|
||||
virtual ~CellLocator();
|
||||
@ -63,7 +64,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
VTKM_CONT virtual const vtkm::exec::CellLocator* PrepareForExecution(
|
||||
vtkm::cont::DeviceAdapterId device,
|
||||
vtkm::cont::Token& token) const = 0;
|
||||
@ -75,7 +75,6 @@ public:
|
||||
vtkm::cont::Token token;
|
||||
return this->PrepareForExecution(device, token);
|
||||
}
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
||||
protected:
|
||||
void SetModified() { this->Modified = true; }
|
||||
@ -89,6 +88,7 @@ private:
|
||||
vtkm::cont::CoordinateSystem Coords;
|
||||
bool Modified = true;
|
||||
};
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
||||
} // namespace cont
|
||||
} // namespace vtkm
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
bool acquireOwnership = true,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
{
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
VTKM_STATIC_ASSERT_MSG((std::is_base_of<VirtualBaseType, VirtualDerivedType>::value),
|
||||
"Tried to bind a type that is not a subclass of the base class.");
|
||||
|
||||
@ -118,6 +119,7 @@ public:
|
||||
vtkm::cont::internal::ForEachValidDevice(
|
||||
devices, internal::CreateTransferInterface(), this->Internals.get(), derived);
|
||||
}
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
}
|
||||
|
||||
/// Release all host and execution side resources
|
||||
|
@ -146,7 +146,7 @@ public:
|
||||
// Support deprecated classes
|
||||
operator detail::CellLocatorBaseWrapper<Derived>() const
|
||||
{
|
||||
return detail::CellLocatorBaseExecWrapper<Derived>(*this);
|
||||
return detail::CellLocatorBaseWrapper<Derived>(reinterpret_cast<const Derived&>(*this));
|
||||
}
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
#endif //!VTKM_NO_DEPRECATED_VIRTUAL
|
||||
|
@ -183,8 +183,7 @@ void TestWithDataSet(vtkm::cont::CellLocatorGeneral& locator, const vtkm::cont::
|
||||
vtkm::cont::ArrayHandle<PointType> pcoords;
|
||||
|
||||
vtkm::worklet::DispatcherMapField<FindCellWorklet> dispatcher;
|
||||
// CellLocatorGeneral is non-copyable. Pass it via a pointer.
|
||||
dispatcher.Invoke(points, &locator, cellIds, pcoords);
|
||||
dispatcher.Invoke(points, locator, cellIds, pcoords);
|
||||
|
||||
auto cellIdPortal = cellIds.ReadPortal();
|
||||
auto expCellIdsPortal = expCellIds.ReadPortal();
|
||||
|
@ -30,6 +30,7 @@ class VTKM_DEPRECATED(
|
||||
"CellLocator with virtual methods no longer supported. Use CellLocatorGeneral.")
|
||||
VTKM_ALWAYS_EXPORT CellLocator : public vtkm::VirtualObjectBase
|
||||
{
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
public:
|
||||
VTKM_EXEC_CONT virtual ~CellLocator() noexcept
|
||||
{
|
||||
@ -55,6 +56,7 @@ public:
|
||||
worklet.RaiseError(vtkm::ErrorString(status));
|
||||
}
|
||||
}
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
};
|
||||
|
||||
} // namespace exec
|
||||
|
@ -26,10 +26,10 @@ namespace detail
|
||||
struct FindCellFunctor
|
||||
{
|
||||
template <typename Locator>
|
||||
vtkm::ErrorCode operator()(Locator&& locator,
|
||||
const vtkm::Vec3f& point,
|
||||
vtkm::Id& cellId,
|
||||
vtkm::Vec3f& parametric) const
|
||||
VTKM_EXEC vtkm::ErrorCode operator()(Locator&& locator,
|
||||
const vtkm::Vec3f& point,
|
||||
vtkm::Id& cellId,
|
||||
vtkm::Vec3f& parametric) const
|
||||
{
|
||||
return locator.FindCell(point, cellId, parametric);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
const vtkm::FloatDefault& time,
|
||||
vtkm::VecVariable<Point, 2>& out) const
|
||||
{
|
||||
vtkm::Id cellId;
|
||||
vtkm::Id cellId = -1;
|
||||
Point parametric;
|
||||
GridEvaluatorStatus status;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user