createDeviceObject

createDeviceObject#

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

◆ createDeviceObject() [1/2]

template<typename Key , typename T , typename Hash = hash<Key>, typename KeyEqual = equal_to<Key>, typename Allocator = safe_device_allocator<pair<const Key, T>>>
static unordered_map stdgpu::unordered_map< Key, T, Hash, KeyEqual, 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
Precondition
capacity > 0
Returns
A newly created object of this class allocated on the GPU (device)