DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Memory.h File Reference

Go to the source code of this file.

Functions

DW_API_PUBLIC void * memcpy_opt (void *__restrict destination, const void *__restrict source, size_t num)
 Memory copy of virtual process memory. More...
 

Function Documentation

◆ memcpy_opt()

DW_API_PUBLIC void* memcpy_opt ( void *__restrict  destination,
const void *__restrict  source,
size_t  num 
)

Memory copy of virtual process memory.

This subroutine call std::memcpy() for x86_64, and custom optimized implementation for aarch64. As in standard memcpy call destination and source memory blocks should not overlap.

NOTE: only use this function if the source address belongs to a CUDA Pinned Host memory region. If either destination or source is an invalid or null pointer, the behavior is undefined, even if count is zero. Please check std::memcpy() documentation for details.

Parameters
[out]destinationpointer to destination memory into which num bytes will be copied from source
[in]sourcepointer to source memory which will be copied destination
[in]numnumber of bytes to copy
Returns
pointer to destination