vtk-m/vtkm/cont/ArrayHandle.cxx
Kenneth Moreland 3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00

46 lines
1.1 KiB
C++

//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/cont/ArrayHandle.h>
namespace vtkm
{
namespace cont
{
namespace detail
{
VTKM_CONT void ArrayHandleReleaseResourcesExecution(
const std::vector<vtkm::cont::internal::Buffer>& buffers)
{
vtkm::cont::Token token;
for (auto&& buf : buffers)
{
buf.ReleaseDeviceResources();
}
}
VTKM_CONT bool ArrayHandleIsOnDevice(const std::vector<vtkm::cont::internal::Buffer>& buffers,
vtkm::cont::DeviceAdapterId device)
{
for (auto&& buf : buffers)
{
if (!buf.IsAllocatedOnDevice(device))
{
return false;
}
}
return true;
}
}
}
} // namespace vtkm::cont::detail