device_cbegin

device_cbegin#

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

◆ device_cbegin() [2/2]

template<typename T , typename Allocator = safe_device_allocator<T>>
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
device_ptr< const T > stdgpu::vector< T, Allocator >::device_cbegin ( ExecutionPolicy &&  policy) const

Creates a pointer to the begin of the device container.

Template Parameters
ExecutionPolicyThe type of the execution policy
Parameters
[in]policyThe execution policy, e.g. host or device, corresponding to the allocator
Returns
A const pointer to the begin of the object