Celeritas 0.6.0-rc.2.13+develop.285b9112
Loading...
Searching...
No Matches
Classes | Functions | Variables
Span.hh File Reference
#include <cstddef>
#include <type_traits>
#include "corecel/Macros.hh"
#include "Array.hh"
#include "detail/SpanImpl.hh"

Classes

class  celeritas::Span< T, Extent >
 Non-owning reference to a contiguous span of data. More...
 

Functions

template<class T >
 celeritas::Span (T *, std::size_t) -> Span< T >
 
template<class Iter >
 celeritas::Span (Iter, Iter) -> Span< typename std::iterator_traits< Iter >::value_type >
 
template<class T , std::size_t N>
 celeritas::Span (T(&)[N]) -> Span< T, N >
 
template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION Span< T, N > celeritas::make_span (Array< T, N > &x)
 Get a mutable fixed-size view to an array.
 
template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION Span< T const, N > celeritas::make_span (Array< T, N > const &x)
 Get a constant fixed-size view to an array.
 
template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION Span< T, N > celeritas::make_span (T(&arr)[N])
 Get a mutable fixed-size view to a C array.
 
template<class T >
CELER_CONSTEXPR_FUNCTION Span< typename T::value_type > celeritas::make_span (T &cont)
 Get a mutable view to a generic container.
 
template<class T >
CELER_CONSTEXPR_FUNCTION Span< typename T::value_type constceleritas::make_span (T const &cont)
 Get a const view to a generic container.
 
template<class T , std::size_t N>
CELER_CONSTEXPR_FUNCTION auto celeritas::make_array (Span< T, N > const &s)
 Construct an array from a fixed-size span.
 

Variables

constexpr std::size_t celeritas::dynamic_extent = detail::dynamic_extent
 Sentinel value for span of dynamic type.