libcuspatial  24.04.00
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
cuspatial::range< IteratorType > Class Template Reference

Abstract Data Type (ADT) for any containers representable with a start and end iterator. More...

Public Types

using value_type = iterator_value_type<IteratorType>
 

Public Member Functions

 range (IteratorType begin, IteratorType end)
 
auto CUSPATIAL_HOST_DEVICE begin ()
 Return the start iterator to the range.
 
auto CUSPATIAL_HOST_DEVICE end ()
 Return the end iterator to the range.
 
auto CUSPATIAL_HOST_DEVICE size ()
 Return the size of the range.
 
template<typename IndexType >
auto &CUSPATIAL_HOST_DEVICE operator[] (IndexType i)
 Access the ith element in the range.
 

Detailed Description

template<typename IteratorType>
class cuspatial::range< IteratorType >

Abstract Data Type (ADT) for any containers representable with a start and end iterator.

This is similar to a span, except that the iterators can be composed of generators.

Note
Although this structure can be used on device and host code, this structure does not provide implicit device-host transfer. It is up to developer's prudence not to access device memory from host or the reverse.
Template Parameters
Typeof both start and end iterator. IteratorType must satisfy LegacyRandomAccessIteratorLinkLRAI.

Definition at line 43 of file range.cuh.

Member Typedef Documentation

◆ value_type

template<typename IteratorType >
using cuspatial::range< IteratorType >::value_type = iterator_value_type<IteratorType>

Definition at line 45 of file range.cuh.

Constructor & Destructor Documentation

◆ range()

template<typename IteratorType >
cuspatial::range< IteratorType >::range ( IteratorType begin,
IteratorType end )
inline

Definition at line 46 of file range.cuh.

Member Function Documentation

◆ begin()

template<typename IteratorType >
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::begin ( )
inline

Return the start iterator to the range.

Definition at line 49 of file range.cuh.

◆ end()

template<typename IteratorType >
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::end ( )
inline

Return the end iterator to the range.

Definition at line 51 of file range.cuh.

◆ operator[]()

template<typename IteratorType >
template<typename IndexType >
auto &CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::operator[] ( IndexType i)
inline

Access the ith element in the range.

Definition at line 57 of file range.cuh.

◆ size()

template<typename IteratorType >
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::size ( )
inline

Return the size of the range.

Definition at line 53 of file range.cuh.


The documentation for this class was generated from the following file: