C++20 std::span with reduced feature set. More...
#include <span.hpp>
Public Types | |
using | element_type = T |
The type of the elements in the span. | |
using | value_type = std::remove_cv< T > |
Stored value type. | |
using | size_type = std::size_t |
The type used for the size of the span. | |
using | difference_type = std::ptrdiff_t |
std::ptrdiff_t | |
using | pointer = T * |
The type of the pointer returned by data() | |
using | iterator = T * |
The type of the iterator returned by begin() | |
using | const_pointer = T const * |
The type of the pointer returned by data() const. | |
using | reference = T & |
The type of the reference returned by operator[](size_type) | |
using | const_reference = T const & |
The type of the reference returned by operator[](size_type) const. | |
Public Member Functions | |
constexpr CUDF_HOST_DEVICE | span_base (pointer data, size_type size) |
Constructs a span from a pointer and a size. More... | |
constexpr CUDF_HOST_DEVICE | span_base (span_base const &) noexcept=default |
Copy constructor. | |
constexpr CUDF_HOST_DEVICE span_base & | operator= (span_base const &) noexcept=default |
Copy assignment operator. More... | |
constexpr CUDF_HOST_DEVICE iterator | begin () const noexcept |
Returns an iterator to the first element of the span. More... | |
constexpr CUDF_HOST_DEVICE iterator | end () const noexcept |
Returns an iterator to the element following the last element of the span. More... | |
constexpr CUDF_HOST_DEVICE pointer | data () const noexcept |
Returns a pointer to the beginning of the sequence. More... | |
constexpr CUDF_HOST_DEVICE size_type | size () const noexcept |
Returns the number of elements in the span. More... | |
constexpr CUDF_HOST_DEVICE size_type | size_bytes () const noexcept |
Returns the size of the sequence in bytes. More... | |
constexpr CUDF_HOST_DEVICE bool | empty () const noexcept |
Checks if the span is empty. More... | |
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... | |
Static Public Attributes | |
static constexpr std::size_t | extent = Extent |
The extent of the span. | |
Protected Attributes | |
pointer | _data {nullptr} |
Pointer to the first element in the span. | |
size_type | _size {0} |
The number of elements in the span. | |
C++20 std::span with reduced feature set.
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
constexprdefaultnoexcept |
Copy assignment operator.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |