copyCreateDevice2HostArray

copyCreateDevice2HostArray#

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

◆ copyCreateDevice2HostArray()

template<typename T >
T * copyCreateDevice2HostArray ( const T *  device_array,
const stdgpu::index64_t  count,
const MemoryCopy  check_safety = MemoryCopy::RANGE_CHECK 
)

Creates and copies the given device array to the host.

Template Parameters
TThe type of the array
Parameters
[in]device_arrayThe device array
[in]countThe number of elements of device_array
[in]check_safetyTrue if this function should check whether copying is safe, false otherwise
Returns
The same array allocated on the host
Note
The source array might also be a managed array