mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Avoid use of values as both input and retun valye in worklet
This commit is contained in:
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++)
|
||||
|
Loading…
Reference in New Issue
Block a user