createDeviceObject

createDeviceObject#

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

◆ createDeviceObject() [2/2]

template<typename Key , typename Hash = hash<Key>, typename KeyEqual = equal_to<Key>, typename Allocator = safe_device_allocator<Key>>
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
static unordered_set stdgpu::unordered_set< Key, Hash, KeyEqual, Allocator >::createDeviceObject ( ExecutionPolicy &&  policy,
const index_t capacity,
const Allocator &  allocator = Allocator() 
)
static

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

Template Parameters
ExecutionPolicyThe type of the execution policy
Parameters
[in]policyThe execution policy, e.g. host or device, corresponding to the allocator
[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)