mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
Use serial device for copies in DataSetBuilderRectilinear
A previous change used the Copy method of DeviceAdapterAlgorithm to perform the actual copy in the CopyInto method. This works fine, except that it uses the default device adapter, and the default device adapter may need to copy the data to the device just to copy it to another array. Instead, use the serial device adapter, which is guaranteed to only perform one copy of the data.
This commit is contained in:
parent
0731bd4a53
commit
f4e4dc9ebe
@ -25,7 +25,7 @@
|
||||
#include <vtkm/cont/Assert.h>
|
||||
#include <vtkm/cont/CoordinateSystem.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/cont/DeviceAdapterSerial.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -48,8 +48,8 @@ class DataSetBuilderRectilinear
|
||||
void CopyInto(const vtkm::cont::ArrayHandle<T>& input,
|
||||
vtkm::cont::ArrayHandle<U>& output )
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG>
|
||||
Algorithm;
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<
|
||||
vtkm::cont::DeviceAdapterTagSerial> Algorithm;
|
||||
Algorithm::Copy(input, output);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user