Public Types | Public Member Functions | Static Public Attributes | List of all members
cudf::detail::span_base< T, Extent, Derived > Class Template Reference

C++20 std::span with reduced feature set. More...

#include <span.hpp>

Public Types

using element_type = T
 
using value_type = std::remove_cv< T >
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using iterator = T *
 
using const_pointer = T const *
 
using reference = T &
 
using const_reference = T const &
 

Public Member Functions

constexpr span_base (pointer data, size_type size)
 
constexpr span_base (span_base const &other) noexcept=default
 
constexpr span_baseoperator= (span_base const &other) noexcept=default
 
constexpr reference front () const
 
constexpr reference back () const
 
constexpr reference operator[] (size_type idx) const
 
constexpr iterator begin () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr pointer data () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr size_type size_bytes () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr Derived first (size_type count) const noexcept
 Obtains a subspan consisting of the first N elements of the sequence. More...
 
constexpr Derived last (size_type count) const noexcept
 Obtains a subspan consisting of the last N elements of the sequence. More...
 
constexpr Derived subspan (size_type offset, size_type count) const noexcept
 

Static Public Attributes

static constexpr std::size_t extent = Extent
 

Detailed Description

template<typename T, std::size_t Extent, typename Derived>
class cudf::detail::span_base< T, Extent, Derived >

C++20 std::span with reduced feature set.

Definition at line 42 of file span.hpp.

Member Function Documentation

◆ first()

template<typename T , std::size_t Extent, typename Derived >
constexpr Derived cudf::detail::span_base< T, Extent, Derived >::first ( size_type  count) const
inlineconstexprnoexcept

Obtains a subspan consisting of the first N elements of the sequence.

Parameters
countNumber of elements from the beginning of this span to put in the subspan.

Definition at line 84 of file span.hpp.

◆ last()

template<typename T , std::size_t Extent, typename Derived >
constexpr Derived cudf::detail::span_base< T, Extent, Derived >::last ( size_type  count) const
inlineconstexprnoexcept

Obtains a subspan consisting of the last N elements of the sequence.

Parameters
countNumber of elements from the end of this span to put in the subspan

Definition at line 91 of file span.hpp.


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