Make offsets for ArrayHandleGroupVecVariable always input
The offsets for an ArrayHandleGroupVecVariable are always inputs and cannot be changed, even when the array handle is used as an output. There was a mistake where the PrepareFor* methods tried to make the offsets mutable. In the case of an output, the offsets were not pushed to the execution environment, and the arrays could not be looked up.
This commit is contained in:
parent
6d9766943e
commit
81f7ff2391
@ -305,7 +305,7 @@ public:
|
||||
using PortalExecution =
|
||||
vtkm::exec::internal::ArrayPortalGroupVecVariable<
|
||||
typename SourceArrayHandleType::template ExecutionTypes<Device>::Portal,
|
||||
typename OffsetsArrayHandleType::template ExecutionTypes<Device>::Portal>;
|
||||
typename OffsetsArrayHandleType::template ExecutionTypes<Device>::PortalConst>;
|
||||
using PortalConstExecution =
|
||||
vtkm::exec::internal::ArrayPortalGroupVecVariable<
|
||||
typename SourceArrayHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
@ -334,7 +334,7 @@ public:
|
||||
PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData))
|
||||
{
|
||||
return PortalExecution(this->SourceArray.PrepareForInPlace(Device()),
|
||||
this->OffsetsArray.PrepareForInPlace(Device()));
|
||||
this->OffsetsArray.PrepareForInput(Device()));
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
@ -344,8 +344,7 @@ public:
|
||||
VTKM_ASSERT(numberOfValues == this->OffsetsArray.GetNumberOfValues());
|
||||
return PortalExecution(this->SourceArray.PrepareForOutput(
|
||||
this->SourceArray.GetNumberOfValues(), Device()),
|
||||
this->OffsetsArray.PrepareForOutput(
|
||||
numberOfValues, Device()));
|
||||
this->OffsetsArray.PrepareForInput(Device()));
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
|
0
vtkm/cont/StorageBasic.h
Executable file → Normal file
0
vtkm/cont/StorageBasic.h
Executable file → Normal file
Loading…
Reference in New Issue
Block a user