Avoid use of values as both input and retun valye in worklet

This commit is contained in:
Oliver Ruebel 2020-11-18 02:37:29 -08:00 committed by Gunther H. Weber
parent cb98eea5e3
commit b630919c3b

@ -73,17 +73,24 @@ public:
using ControlSignature = void(FieldInOut newVertexId, // Input/Output
FieldIn keptInBract // input
);
using ExecutionSignature = _1(_1, _2);
using ExecutionSignature = void(_1, _2);
using InputDomain = _1;
// Default Constructor
VTKM_EXEC_CONT
CompressRegularisedNodesCopyNecessaryRegularNodesWorklet() {}
VTKM_EXEC vtkm::Id operator()(vtkm::Id& newVertexIdIn, const vtkm::Id& keptInBract) const
VTKM_EXEC void operator()(vtkm::Id& newVertexIdIn, const vtkm::Id& keptInBract) const
{
return (!vtkm::worklet::contourtree_augmented::NoSuchElement(newVertexIdIn)) ? (keptInBract - 1)
: newVertexIdIn;
if (!vtkm::worklet::contourtree_augmented::NoSuchElement(newVertexIdIn))
{
newVertexIdIn = keptInBract - 1;
}
else
{
// newVertexIdIn does not change
}
// In serial this worklet implements the following operation
/*
for (indexType returnIndex = 0; returnIndex < bractVertexSuperset.size(); returnIndex++)