copyHost2DeviceArray

copyHost2DeviceArray#

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

◆ copyHost2DeviceArray()

template<typename T >
void copyHost2DeviceArray ( const T *  source_host_array,
const stdgpu::index64_t  count,
T *  destination_device_array,
const MemoryCopy  check_safety = MemoryCopy::RANGE_CHECK 
)

Copies the given host array to the device.

Template Parameters
TThe type of the array
Parameters
[in]source_host_arrayThe host array
[in]countThe number of elements of source_host_array
[out]destination_device_arrayThe device 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