|
| span (std::byte *ptr, size_type count, size_type stride=sizeof(T)) |
|
reference | operator[] (size_type idx) const |
|
pointer | data () const noexcept |
|
size_type | size () const noexcept |
|
size_type | stride () const noexcept |
|
iterator | begin () const noexcept |
|
iterator | end () const noexcept |
|
template<typename T>
class nt::span< T >
Definition at line 34 of file ntuples_full.h.
◆ difference_type
using difference_type = std::ptrdiff_t |
◆ element_type
◆ pointer
◆ reference
◆ size_type
using size_type = std::size_t |
◆ value_type
using value_type = std::remove_cv_t<T> |
◆ span()
span |
( |
std::byte * |
ptr, |
|
|
size_type |
count, |
|
|
size_type |
stride = sizeof(T) |
|
) |
| |
|
inline |
Definition at line 85 of file ntuples_full.h.
86 : m_ptr(ptr), m_count(count), m_stride(stride) {}
◆ begin()
Definition at line 108 of file ntuples_full.h.
109 {
110 return iterator(m_ptr, m_stride);
111 }
◆ data()
Definition at line 93 of file ntuples_full.h.
94 {
95 return reinterpret_cast<pointer>(m_ptr);
96 }
◆ end()
Definition at line 113 of file ntuples_full.h.
114 {
115 return iterator(m_ptr + m_count * m_stride, m_stride);
116 }
◆ operator[]()
reference operator[] |
( |
size_type |
idx | ) |
const |
|
inline |
Definition at line 88 of file ntuples_full.h.
89 {
90 return *reinterpret_cast<pointer>(m_ptr + idx * m_stride);
91 }
◆ size()
◆ stride()
size_type stride |
( |
| ) |
const |
|
inlinenoexcept |
◆ m_count
◆ m_ptr
◆ m_stride
The documentation for this class was generated from the following file: