device_range< T >

device_range< T >#

stdgpu: stdgpu::device_range< T >
stdgpu Latest
Efficient STL-like Data Structures on the GPU

Detailed Description

template<typename T>
class stdgpu::device_range< T >

A class representing a device range over an array.

Template Parameters
TThe value type

Public Types

using difference_type = typename iterator::difference_type
 
using iterator = device_ptr< T >
 
using reference = typename iterator::reference
 
using value_type = typename iterator::value_type
 

Public Member Functions

 device_range ()=default
 
STDGPU_HOST_DEVICE device_range (iterator begin, index64_t n)
 
STDGPU_HOST_DEVICE device_range (iterator begin, iterator end)
 
 device_range (T *p)
 
STDGPU_HOST_DEVICE device_range (T *p, index64_t n)
 
STDGPU_HOST_DEVICE iterator begin () const noexcept
 
STDGPU_HOST_DEVICE bool empty () const
 
STDGPU_HOST_DEVICE iterator end () const noexcept
 
STDGPU_HOST_DEVICE index64_t size () const