d1160638b7
`vtkm::cont::UnknownArrayHandle` now provides a set of method that allows you to copy data from one `UnknownArrayHandle` to another. The first method, `DeepCopyFrom`, takes a source `UnknownArrayHandle` and deep copies the data to the called one. If the `UnknownArrayHandle` already points to a real `ArrayHandle`, the data is copied into that `ArrayHandle`. If the `UnknownArrayHandle` does not point to an existing `ArrayHandle`, then a new `ArrayHandleBasic` with the same value type as the source is created and copied into. The second method, `CopyShallowIfPossibleFrom` behaves similarly to `DeepCopyFrom` except that it will perform a shallow copy if possible. That is, if the target `UnknownArrayHandle` points to an `ArrayHandle` of the same type as the source `UnknownArrayHandle`, then a shallow copy occurs and the underlying `ArrayHandle` will point to the source. If the types differ, then a deep copy is performed. If the target `UnknownArrayHandle` does not point to an `ArrayHandle`, then the behavior is the same as the `=` operator. One of the intentions of these new methods is to allow you to copy arrays without using a device compiler (e.g. `nvcc`). Calling `ArrayCopy` requires you to include the `ArrayCopy.h` header file, and that in turn requires device adapter algorithms. These methods insulate you from these. |
||
---|---|---|
.. | ||
testing | ||
ArrayCopyUnknown.h | ||
ArrayHandleDeprecated.h | ||
ArrayHandleExecutionManager.h | ||
ArrayPortalFromIterators.h | ||
ArrayTransfer.h | ||
AtomicInterfaceControl.h | ||
AtomicInterfaceExecution.h | ||
Buffer.cxx | ||
Buffer.h | ||
CastInvalidValue.h | ||
CellLocatorBase.h | ||
CMakeLists.txt | ||
ConnectivityExplicitInternals.h | ||
ConvertNumComponentsToOffsetsTemplate.h | ||
DefaultTypesAscent.h.in | ||
DefaultTypesVTK.h.in | ||
DeviceAdapterAlgorithmGeneral.h | ||
DeviceAdapterListHelpers.h | ||
DeviceAdapterMemoryManager.cxx | ||
DeviceAdapterMemoryManager.h | ||
DeviceAdapterMemoryManagerShared.cxx | ||
DeviceAdapterMemoryManagerShared.h | ||
FunctorsGeneral.h | ||
IteratorFromArrayPortal.h | ||
KXSort.h | ||
OptionParser.h | ||
OptionParserArguments.h | ||
ParallelRadixSort.h | ||
ParallelRadixSortInterface.h | ||
PointLocatorBase.h | ||
ReverseConnectivityBuilder.h | ||
RuntimeDeviceConfiguration.cxx | ||
RuntimeDeviceConfiguration.h | ||
RuntimeDeviceConfigurationOptions.cxx | ||
RuntimeDeviceConfigurationOptions.h | ||
RuntimeDeviceOption.cxx | ||
RuntimeDeviceOption.h | ||
StorageDeprecated.h | ||
StorageError.h | ||
TransferInfo.cxx | ||
TransferInfo.h | ||
Variant.h | ||
VirtualObjectTransfer.cxx | ||
VirtualObjectTransfer.h | ||
VirtualObjectTransferInstantiate.h | ||
VirtualObjectTransferShareWithControl.h |