mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Refactor to more idiomatic use of worklets.
This commit is contained in:
parent
7b95ef5975
commit
f1cf6c762a
@ -66,15 +66,12 @@ public:
|
||||
orange_ = vtkm::Vec4f(1.0, 0.5, 0.0, 0.0);
|
||||
}
|
||||
|
||||
using ControlSignature = void(WholeArrayIn, WholeArrayOut);
|
||||
using ControlSignature = void(FieldIn, WholeArrayOut);
|
||||
using ExecutionSignature = void(_1, _2, WorkIndex);
|
||||
|
||||
template <typename InputArrayPortalType, typename OutputArrayPortalType>
|
||||
VTKM_EXEC void operator()(const InputArrayPortalType& inputArrayPortal,
|
||||
OutputArrayPortalType& outputArrayPortal,
|
||||
vtkm::Id workIndex) const
|
||||
template <typename OutputArrayPortalType>
|
||||
VTKM_EXEC void operator()(T x, OutputArrayPortalType& outputArrayPortal, vtkm::Id workIndex) const
|
||||
{
|
||||
T x = inputArrayPortal.Get(workIndex);
|
||||
T r = rmin_ + (4.0 - rmin_) * workIndex / (width_ - 1);
|
||||
// We can't display need more limit points than pixels of height:
|
||||
vtkm::Id limit_points = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user