createDeviceObject

createDeviceObject#

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

◆ createDeviceObject() [1/2]

template<typename T , typename Allocator = safe_device_allocator<T>>
static vector< T, Allocator > stdgpu::vector< T, Allocator >::createDeviceObject ( const index_t capacity,
const Allocator &  allocator = Allocator() 
)
static

Creates an object of this class on the GPU (device)

Parameters
[in]capacityThe capacity of the object
[in]allocatorThe allocator instance to use
Returns
A newly created object of this class allocated on the GPU (device)
Precondition
capacity > 0