empty

empty#

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

◆ empty() [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 > >) >
bool stdgpu::vector< T, Allocator >::empty ( ExecutionPolicy &&  policy) const

Checks if the object is empty.

Template Parameters
ExecutionPolicyThe type of the execution policy
Parameters
[in]policyThe execution policy, e.g. host or device, corresponding to the allocator
Returns
True if the object is empty, false otherwise