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:
Kenneth Moreland 2021-08-06 06:53:29 -06:00
parent 82f5b5ebcf
commit 69bacdfca8
2 changed files with 3 additions and 2 deletions

@ -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