transform_range< R, UnaryFunction >

transform_range< R, UnaryFunction >#

stdgpu: stdgpu::transform_range< R, UnaryFunction >
stdgpu Latest
Efficient STL-like Data Structures on the GPU

Detailed Description

template<typename R, typename UnaryFunction>
class stdgpu::transform_range< R, UnaryFunction >

A class representing range where a transformation is applied first.

Template Parameters
RThe input range type
UnaryFunctionThe transformation function type

Public Types

using difference_type = typename iterator::difference_type
 
using iterator = thrust::transform_iterator< UnaryFunction, typename R::iterator >
 
using reference = typename iterator::reference
 
using value_type = typename iterator::value_type
 

Public Member Functions

 transform_range ()=default
 
STDGPU_HOST_DEVICE transform_range (R r)
 
STDGPU_HOST_DEVICE transform_range (R r, UnaryFunction f)
 
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