copyCreateDevice2DeviceArray

copyCreateDevice2DeviceArray#

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

◆ copyCreateDevice2DeviceArray()

template<typename T >
T * copyCreateDevice2DeviceArray ( 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 device.

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 device
Note
The source array might also be a managed array