mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Fix deprecation warning in histogram example
The examples do not get compiled as often as the test, so minor issues sometimes creep in. The histogram example was still using some deprecated methods.
This commit is contained in:
parent
82f5b5ebcf
commit
69bacdfca8
@ -91,7 +91,7 @@ int main(int argc, char* argv[])
|
||||
vtkm::cont::PartitionedDataSet result = histogram.Execute(pds);
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> bins;
|
||||
result.GetPartition(0).GetField("histogram").GetData().CopyTo(bins);
|
||||
result.GetPartition(0).GetField("histogram").GetData().AsArrayHandle(bins);
|
||||
auto binPortal = bins.ReadPortal();
|
||||
if (rank == 0)
|
||||
{
|
||||
|
@ -44,7 +44,8 @@ public:
|
||||
|
||||
void SetLocalHistogram(vtkm::Id index, const vtkm::cont::Field& field)
|
||||
{
|
||||
this->SetLocalHistogram(index, field.GetData().Cast<vtkm::cont::ArrayHandle<vtkm::Id>>());
|
||||
this->SetLocalHistogram(index,
|
||||
field.GetData().AsArrayHandle<vtkm::cont::ArrayHandle<vtkm::Id>>());
|
||||
}
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> ReduceAll(const vtkm::Id numBins) const
|
||||
|
Loading…
Reference in New Issue
Block a user