mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Merge topic 'arrayhandle-explicit-constructors'
fc9077e0c Mark ArrayHandle constructors taking buffers, as explicit Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3076
This commit is contained in:
commit
b4b45495c6
@ -186,6 +186,18 @@ struct GetTypeInParentheses<void(T)>
|
||||
} \
|
||||
\
|
||||
VTKM_CONT \
|
||||
explicit classname(const std::vector<vtkm::cont::internal::Buffer>& buffers) \
|
||||
: Superclass(buffers) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
VTKM_CONT \
|
||||
explicit classname(std::vector<vtkm::cont::internal::Buffer>&& buffers) noexcept \
|
||||
: Superclass(std::move(buffers)) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
VTKM_CONT \
|
||||
Thisclass& operator=(const Thisclass& src) \
|
||||
{ \
|
||||
this->Superclass::operator=(src); \
|
||||
@ -332,12 +344,12 @@ public:
|
||||
/// Special constructor for subclass specializations that need to set the
|
||||
/// initial state array. Used when pulling data from other sources.
|
||||
///
|
||||
VTKM_CONT ArrayHandle(const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
VTKM_CONT explicit ArrayHandle(const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
: Buffers(buffers)
|
||||
{
|
||||
}
|
||||
|
||||
VTKM_CONT ArrayHandle(std::vector<vtkm::cont::internal::Buffer>&& buffers) noexcept
|
||||
VTKM_CONT explicit ArrayHandle(std::vector<vtkm::cont::internal::Buffer>&& buffers) noexcept
|
||||
: Buffers(std::move(buffers))
|
||||
{
|
||||
}
|
||||
|
@ -230,11 +230,11 @@ public:
|
||||
|
||||
static FirstArrayType GetFirstArray(const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
{
|
||||
return { FirstArrayBuffers(buffers) };
|
||||
return FirstArrayType(FirstArrayBuffers(buffers));
|
||||
}
|
||||
static SecondArrayType GetSecondArray(const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
{
|
||||
return { SecondArrayBuffers(buffers) };
|
||||
return SecondArrayType(SecondArrayBuffers(buffers));
|
||||
}
|
||||
};
|
||||
} // namespace internal
|
||||
|
@ -320,7 +320,7 @@ static void TestIndexing()
|
||||
vtkm::cont::CellSetStructured<3> outCellSet;
|
||||
outCellSet.SetPointDimensions({ outDim });
|
||||
|
||||
vtkm::cont::ArrayHandleUniformPointCoordinates inField{ { inDim } };
|
||||
vtkm::cont::ArrayHandleUniformPointCoordinates inField(vtkm::Id3{ inDim });
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec3f> outField;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user