Commit 61e80037 authored by Robert Maynard's avatar Robert Maynard

Make sure all execution side CellLocator objects have explicit destructors

parent 307898ff
......@@ -84,7 +84,7 @@ namespace exec
//--------------------------------------------------------------------
template <typename CellSetType, typename DeviceAdapter>
class CellLocatorUniformBins : public vtkm::exec::CellLocator
class VTKM_ALWAYS_EXPORT CellLocatorUniformBins : public vtkm::exec::CellLocator
{
private:
using DimVec3 = vtkm::internal::cl_uniform_bins::DimVec3;
......@@ -146,6 +146,12 @@ public:
{
}
VTKM_EXEC_CONT virtual ~CellLocatorUniformBins() noexcept
{
// This must not be defaulted, since defaulted virtual destructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC
void FindCell(const FloatVec3& point,
vtkm::Id& cellId,
......
......@@ -22,6 +22,12 @@ namespace exec
class CellLocator : public vtkm::VirtualObjectBase
{
public:
VTKM_EXEC_CONT virtual ~CellLocator() noexcept
{
// This must not be defaulted, since defaulted virtual destructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC
virtual void FindCell(const vtkm::Vec<vtkm::FloatDefault, 3>& point,
vtkm::Id& cellId,
......
......@@ -52,7 +52,7 @@ struct CellLocatorBoundingIntervalHierarchyNode
}; // struct CellLocatorBoundingIntervalHierarchyNode
template <typename DeviceAdapter, typename CellSetType>
class CellLocatorBoundingIntervalHierarchyExec : public vtkm::exec::CellLocator
class VTKM_ALWAYS_EXPORT CellLocatorBoundingIntervalHierarchyExec : public vtkm::exec::CellLocator
{
using NodeArrayHandle =
vtkm::cont::ArrayHandle<vtkm::exec::CellLocatorBoundingIntervalHierarchyNode>;
......@@ -75,6 +75,13 @@ public:
{
}
VTKM_EXEC_CONT virtual ~CellLocatorBoundingIntervalHierarchyExec() noexcept
{
// This must not be defaulted, since defaulted virtual destructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC
void FindCell(const vtkm::Vec<vtkm::FloatDefault, 3>& point,
vtkm::Id& cellId,
......
......@@ -29,7 +29,7 @@ namespace exec
{
template <typename DeviceAdapter>
class CellLocatorRectilinearGrid : public vtkm::exec::CellLocator
class VTKM_ALWAYS_EXPORT CellLocatorRectilinearGrid : public vtkm::exec::CellLocator
{
private:
using FromType = vtkm::TopologyElementTagPoint;
......@@ -71,6 +71,12 @@ public:
this->MaxPoint[2] = coords.GetPortalConstControl().GetThirdPortal().Get(PointDimensions[2] - 1);
}
VTKM_EXEC_CONT virtual ~CellLocatorRectilinearGrid() noexcept
{
// This must not be defaulted, since defaulted virtual destructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC
inline bool IsInside(const vtkm::Vec<vtkm::FloatDefault, 3>& point) const
{
......
......@@ -28,7 +28,7 @@ namespace exec
{
template <typename DeviceAdapter>
class CellLocatorUniformGrid : public vtkm::exec::CellLocator
class VTKM_ALWAYS_EXPORT CellLocatorUniformGrid : public vtkm::exec::CellLocator
{
private:
using FromType = vtkm::TopologyElementTagPoint;
......@@ -57,6 +57,12 @@ public:
{
}
VTKM_EXEC_CONT virtual ~CellLocatorUniformGrid() noexcept
{
// This must not be defaulted, since defaulted virtual destructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC
void FindCell(const vtkm::Vec<vtkm::FloatDefault, 3>& point,
vtkm::Id& cellId,
......
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