Celeritas  0.5.0-86+4a8eea4
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 , 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_FUNCTION Span< typename T::value_type > celeritas::make_span (T &cont)
 Get a mutable view to a generic container.
 
template<class T >
CELER_FUNCTION Span< typename T::value_type const > celeritas::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.