:orphan: # PetscDeviceCopyMode Describes the copy direction of a device-aware `memcpy` ## Synopsis ``` #include typedef enum { PETSC_DEVICE_COPY_HTOH, PETSC_DEVICE_COPY_DTOH, PETSC_DEVICE_COPY_HTOD, PETSC_DEVICE_COPY_DTOD, PETSC_DEVICE_COPY_AUTO, } PetscDeviceCopyMode; ``` ## Values - ***`PETSC_DEVICE_COPY_HTOH` -*** Copy from host memory to host memory - ***`PETSC_DEVICE_COPY_DTOH` -*** Copy from device memory to host memory - ***`PETSC_DEVICE_COPY_HTOD` -*** Copy from host memory to device memory - ***`PETSC_DEVICE_COPY_DTOD` -*** Copy from device memory to device memory - ***`PETSC_DEVICE_COPY_AUTO` -*** Infer the copy direction from the pointers ## See Also `PetscDeviceArrayCopy()`, `PetscDeviceMemcpy()` ## Level beginner ## Location include/petscdevicetypes.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdevicetypes.h) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)