mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
VecFromPortal::CopyTo can now handle const value Portals.
This commit is contained in:
parent
ba6af4e008
commit
3e09b2cebc
@ -38,7 +38,8 @@ template<typename PortalType>
|
||||
class VecFromPortal
|
||||
{
|
||||
public:
|
||||
typedef typename PortalType::ValueType ComponentType;
|
||||
using ComponentType =
|
||||
typename std::remove_const<typename PortalType::ValueType>::type;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_EXPORT
|
||||
@ -56,9 +57,9 @@ public:
|
||||
return this->NumComponents;
|
||||
}
|
||||
|
||||
template<vtkm::IdComponent DestSize>
|
||||
template<typename T, vtkm::IdComponent DestSize>
|
||||
VTKM_EXEC_EXPORT
|
||||
void CopyInto(vtkm::Vec<ComponentType,DestSize> &dest) const
|
||||
void CopyInto(vtkm::Vec<T,DestSize> &dest) const
|
||||
{
|
||||
vtkm::IdComponent numComponents = vtkm::Min(DestSize, this->NumComponents);
|
||||
for (vtkm::IdComponent index = 0; index < numComponents; index++)
|
||||
|
@ -39,7 +39,9 @@ template<typename IndexVecType, typename PortalType>
|
||||
class VecFromPortalPermute
|
||||
{
|
||||
public:
|
||||
typedef typename PortalType::ValueType ComponentType;
|
||||
using ComponentType =
|
||||
typename std::remove_const<typename PortalType::ValueType>::type;
|
||||
|
||||
|
||||
VTKM_EXEC_EXPORT
|
||||
VecFromPortalPermute() { }
|
||||
|
Loading…
Reference in New Issue
Block a user