mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Cell and Point locators have correct export visibility
UBSAN found that these execution object had mixed visibility causing undefined behavior when casting across DSO's.
This commit is contained in:
parent
c7f8275818
commit
512d0431ec
@ -19,7 +19,7 @@ namespace vtkm
|
||||
namespace exec
|
||||
{
|
||||
|
||||
class CellLocator : public vtkm::VirtualObjectBase
|
||||
class VTKM_ALWAYS_EXPORT CellLocator : public vtkm::VirtualObjectBase
|
||||
{
|
||||
public:
|
||||
VTKM_EXEC_CONT virtual ~CellLocator() noexcept
|
||||
|
@ -52,7 +52,8 @@ struct CellLocatorBoundingIntervalHierarchyNode
|
||||
}; // struct CellLocatorBoundingIntervalHierarchyNode
|
||||
|
||||
template <typename DeviceAdapter, typename CellSetType>
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorBoundingIntervalHierarchyExec : public vtkm::exec::CellLocator
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorBoundingIntervalHierarchyExec final
|
||||
: public vtkm::exec::CellLocator
|
||||
{
|
||||
using NodeArrayHandle =
|
||||
vtkm::cont::ArrayHandle<vtkm::exec::CellLocatorBoundingIntervalHierarchyNode>;
|
||||
|
@ -29,7 +29,7 @@ namespace exec
|
||||
{
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorRectilinearGrid : public vtkm::exec::CellLocator
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorRectilinearGrid final : public vtkm::exec::CellLocator
|
||||
{
|
||||
private:
|
||||
using FromType = vtkm::TopologyElementTagPoint;
|
||||
|
@ -28,7 +28,7 @@ namespace exec
|
||||
{
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorUniformGrid : public vtkm::exec::CellLocator
|
||||
class VTKM_ALWAYS_EXPORT CellLocatorUniformGrid final : public vtkm::exec::CellLocator
|
||||
{
|
||||
private:
|
||||
using FromType = vtkm::TopologyElementTagPoint;
|
||||
|
@ -17,9 +17,15 @@ namespace vtkm
|
||||
namespace exec
|
||||
{
|
||||
|
||||
class PointLocator : public vtkm::VirtualObjectBase
|
||||
class VTKM_ALWAYS_EXPORT PointLocator : public vtkm::VirtualObjectBase
|
||||
{
|
||||
public:
|
||||
VTKM_EXEC_CONT virtual ~PointLocator() noexcept
|
||||
{
|
||||
// This must not be defaulted, since defaulted virtual destructors are
|
||||
// troublesome with CUDA __host__ __device__ markup.
|
||||
}
|
||||
|
||||
VTKM_EXEC virtual void FindNearestNeighbor(const vtkm::Vec<vtkm::FloatDefault, 3>& queryPoint,
|
||||
vtkm::Id& pointId,
|
||||
vtkm::FloatDefault& distanceSquared) const = 0;
|
||||
|
@ -25,7 +25,7 @@ namespace exec
|
||||
{
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
class PointLocatorUniformGrid : public vtkm::exec::PointLocator
|
||||
class VTKM_ALWAYS_EXPORT PointLocatorUniformGrid final : public vtkm::exec::PointLocator
|
||||
{
|
||||
public:
|
||||
using CoordPortalType =
|
||||
|
Loading…
Reference in New Issue
Block a user