copyCreateHost2DeviceArray

copyCreateHost2DeviceArray#

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

◆ copyCreateHost2DeviceArray()

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

Creates and copies the given host array to the device.

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