Celeritas  0.5.0-56+6b053cd
Classes | Typedefs | Functions
LdgIterator.hh File Reference
#include <cstddef>
#include <iterator>
#include <type_traits>
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
#include "corecel/cont/Span.hh"
#include "corecel/math/Algorithms.hh"
#include "detail/LdgIteratorImpl.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::LdgIterator< T >
 Iterator for read-only device data in global memory. More...
 
struct  celeritas::LdgValue< T >
 Wrapper struct for specializing on types supported by LdgIterator. More...
 

Typedefs

template<class T , std::size_t Extent = dynamic_extent>
using celeritas::LdgSpan = Span< LdgValue< T >, Extent >
 Alias for a Span iterating over values read using __ldg.
 

Functions

template<class T >
 celeritas::LdgIterator (T *) -> LdgIterator< std::add_const_t< T >>
 
template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION auto celeritas::make_array (LdgSpan< T, N > const &s)
 Construct an array from a fixed-size span, removing LdgValue marker. More...
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (LdgIterator< T > const &it, std::nullptr_t) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (LdgIterator< T > const &it, std::nullptr_t) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (std::nullptr_t, LdgIterator< T > const &it) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (std::nullptr_t, LdgIterator< T > const &it) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator< (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator> (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator<= (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator>= (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator< T > celeritas::operator+ (LdgIterator< T > const &it, typename LdgIterator< T >::difference_type const n) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator< T > celeritas::operator+ (typename LdgIterator< T >::difference_type const n, LdgIterator< T > const &it) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator< T > celeritas::operator- (LdgIterator< T > const &it, typename LdgIterator< T >::difference_type const n) noexcept
 
template<class T >
CELER_CONSTEXPR_FUNCTION auto celeritas::operator- (LdgIterator< T > const &lhs, LdgIterator< T > const &rhs) noexcept -> typename LdgIterator< T >::difference_type
 
template<class T >
CELER_CONSTEXPR_FUNCTION void celeritas::swap (LdgIterator< T > &lhs, LdgIterator< T > &rhs) noexcept
 

Function Documentation

◆ make_array()

template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION auto celeritas::make_array ( LdgSpan< T, N > const &  s)

Construct an array from a fixed-size span, removing LdgValue marker.

Note:

make_array(Span<T,N> const&)
CELER_CONSTEXPR_FUNCTION auto make_array(Span< T, N > const &s)
Construct an array from a fixed-size span.
Definition: Span.hh:240

is not reused because:

  1. Using this overload reads input data using __ldg
  2. return make_array<T, N>(s)
    results in segfault (gcc 11.3). This might be a compiler bug because temporary lifetime should be extended until the end of the expression and we return a copy...

◆ operator!=() [1/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( LdgIterator< T > const &  it,
std::nullptr_t   
)
noexcept

RandomAccessIterator requirements

◆ operator!=() [2/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ operator!=() [3/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( std::nullptr_t  ,
LdgIterator< T > const &  it 
)
noexcept

RandomAccessIterator requirements

◆ operator+() [1/2]

template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator<T> celeritas::operator+ ( LdgIterator< T > const &  it,
typename LdgIterator< T >::difference_type const  n 
)
noexcept

RandomAccessIterator requirements

◆ operator+() [2/2]

template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator<T> celeritas::operator+ ( typename LdgIterator< T >::difference_type const  n,
LdgIterator< T > const &  it 
)
noexcept

RandomAccessIterator requirements

◆ operator-() [1/2]

template<class T >
CELER_CONSTEXPR_FUNCTION LdgIterator<T> celeritas::operator- ( LdgIterator< T > const &  it,
typename LdgIterator< T >::difference_type const  n 
)
noexcept

RandomAccessIterator requirements

◆ operator-() [2/2]

template<class T >
CELER_CONSTEXPR_FUNCTION auto celeritas::operator- ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
) -> typename LdgIterator<T>::difference_type
noexcept

RandomAccessIterator requirements

◆ operator<()

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator< ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ operator<=()

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator<= ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ operator==() [1/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( LdgIterator< T > const &  it,
std::nullptr_t   
)
noexcept

RandomAccessIterator requirements

◆ operator==() [2/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ operator==() [3/3]

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( std::nullptr_t  ,
LdgIterator< T > const &  it 
)
noexcept

RandomAccessIterator requirements

◆ operator>()

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator> ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ operator>=()

template<class T >
CELER_CONSTEXPR_FUNCTION bool celeritas::operator>= ( LdgIterator< T > const &  lhs,
LdgIterator< T > const &  rhs 
)
noexcept

RandomAccessIterator requirements

◆ swap()

template<class T >
CELER_CONSTEXPR_FUNCTION void celeritas::swap ( LdgIterator< T > &  lhs,
LdgIterator< T > &  rhs 
)
noexcept

RandomAccessIterator requirements