mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Particle: explicitly make the copy ctor and assignment op
They are disabled because we have a custom destructor.
This commit is contained in:
parent
1037aa756e
commit
482266b442
@ -129,6 +129,13 @@ public:
|
||||
VTKM_EXEC_CONT
|
||||
Particle() {}
|
||||
|
||||
VTKM_EXEC_CONT Particle(const vtkm::Particle& rhs)
|
||||
: ParticleBase(rhs)
|
||||
{
|
||||
// This must not be defaulted, since defaulted copy constructors are
|
||||
// troublesome with CUDA __host__ __device__ markup.
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT ~Particle() noexcept override
|
||||
{
|
||||
// This must not be defaulted, since defaulted virtual destructors are
|
||||
@ -146,6 +153,19 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT Particle& operator=(const vtkm::Particle& rhs)
|
||||
{
|
||||
// This must not be defaulted, since defaulted assignment operators are
|
||||
// troublesome with CUDA __host__ __device__ markup.
|
||||
|
||||
if (&rhs == this)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
vtkm::ParticleBase::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Vec3f Next(const vtkm::VecVariable<vtkm::Vec3f, 2>& vectors,
|
||||
const vtkm::FloatDefault& length) override
|
||||
|
Loading…
Reference in New Issue
Block a user