copyDevice2HostArray

copyDevice2HostArray#

stdgpu: copyDevice2HostArray
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ copyDevice2HostArray()

template<typename T >
void copyDevice2HostArray ( const T *  source_device_array,
const stdgpu::index64_t  count,
T *  destination_host_array,
const MemoryCopy  check_safety = MemoryCopy::RANGE_CHECK 
)

Copies the given device array to the host.

Template Parameters
TThe type of the array
Parameters
[in]source_device_arrayThe device array
[in]countThe number of elements of source_device_array
[out]destination_host_arrayThe host array
[in]check_safetyTrue if this function should check whether copying is safe, false otherwise
Note
The source and destination arrays might also be managed arrays