Generic class for row-major 2D spans. Not compliant with STL container semantics/syntax.
More...
|
constexpr | base_2dspan (T *data, size_t rows, size_t columns) noexcept |
| Constructor a 2D span. More...
|
|
| base_2dspan (T *data, size_type size) noexcept |
| Constructor a 2D span. More...
|
|
constexpr auto | data () const noexcept |
| Returns a pointer to the beginning of the sequence. More...
|
|
constexpr auto | size () const noexcept |
| Returns the size in the span as pair. More...
|
|
constexpr auto | count () const noexcept |
| Returns the number of elements in the span. More...
|
|
constexpr bool | is_empty () const noexcept |
| Checks if the span is empty. More...
|
|
constexpr RowType< T, dynamic_extent > | operator[] (size_t row) const |
| Returns a reference to the row-th element of the sequence. More...
|
|
constexpr RowType< T, dynamic_extent > | front () const |
| Returns a reference to the first element in the span. More...
|
|
constexpr RowType< T, dynamic_extent > | back () const |
| Returns a reference to the last element in the span. More...
|
|
constexpr base_2dspan | subspan (size_t first_row, size_t num_rows) const noexcept |
| Obtains a 2D span that is a view over the num_rows rows of this span starting at first_row More...
|
|
constexpr RowType< T, dynamic_extent > | flat_view () |
| Returns a flattened span of the 2D span. More...
|
|
template<typename OtherT , template< typename, size_t > typename OtherRowType, std::enable_if_t< std::is_convertible_v< OtherRowType< OtherT, dynamic_extent >, RowType< T, dynamic_extent >>, void > * = nullptr> |
constexpr | base_2dspan (base_2dspan< OtherT, OtherRowType > const &other) noexcept |
| Construct a 2D span from another 2D span of convertible type. More...
|
|
template<typename T, template< typename, std::size_t > typename RowType>
class cudf::detail::base_2dspan< T, RowType >
Generic class for row-major 2D spans. Not compliant with STL container semantics/syntax.
The index operator returns the corresponding row.
Definition at line 330 of file span.hpp.
template<typename T , template< typename, std::size_t > typename RowType>
template<typename OtherT , template< typename, size_t > typename OtherRowType, std::enable_if_t< std::is_convertible_v< OtherRowType< OtherT, dynamic_extent >, RowType< T, dynamic_extent >>, void > * = nullptr>
Construct a 2D span from another 2D span of convertible type.
- Template Parameters
-
OtherT | Type of the other 2D span |
OtherRowType | Type of the row of the other 2D span |
- Parameters
-
Definition at line 464 of file span.hpp.
template<typename T , template< typename, std::size_t > typename RowType>
Returns a reference to the row-th element of the sequence.
The behavior is undefined if row is out of range (i.e., if it is greater than or equal to size()).
- Parameters
-
row | the index of the element to access |
- Returns
- A reference to the row-th element of the sequence, i.e.,
data()[row]
Definition at line 402 of file span.hpp.